Isolate data elements out of a column on NaNs

조회 수: 1 (최근 30일)
Chelsey
Chelsey 2011년 10월 6일
I have a large column of mostly "NaN" but it does periodically include actual data. Is there a way I can extract those data to form another vector?

채택된 답변

Fangjun Jiang
Fangjun Jiang 2011년 10월 6일
a=[0 nan 1 nan];
b=a(~isnan(a))

추가 답변 (0개)

카테고리

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

제품

Community Treasure Hunt

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

Start Hunting!

Translated by