필터 지우기
필터 지우기

deleting n entries in matlab

조회 수: 1 (최근 30일)
ali hassan
ali hassan 2022년 2월 12일
편집: Matt J 2022년 2월 12일
if a=[1 nan 4 nan 4 3 ]
how can i delete all nan entries here such that it becomes:
a=[1 4 4 3]

채택된 답변

Matt J
Matt J 2022년 2월 12일
편집: Matt J 2022년 2월 12일
a=[1 nan 4 nan 4 3 ];
a=a(~isnan(a))
a = 1×4
1 4 4 3

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 NaNs에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by