Isolate data elements out of a column on NaNs

1 Ansicht (letzte 30 Tage)
Chelsey
Chelsey am 6 Okt. 2011
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?

Akzeptierte Antwort

Fangjun Jiang
Fangjun Jiang am 6 Okt. 2011
a=[0 nan 1 nan];
b=a(~isnan(a))

Weitere Antworten (0)

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by