Azzera filtri
Azzera filtri

Isolate data elements out of a column on NaNs

1 visualizzazione (ultimi 30 giorni)
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?

Risposta accettata

Fangjun Jiang
Fangjun Jiang il 6 Ott 2011
a=[0 nan 1 nan];
b=a(~isnan(a))

Più risposte (0)

Categorie

Scopri di più su Creating and Concatenating Matrices in Help Center e File Exchange

Prodotti

Community Treasure Hunt

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

Start Hunting!

Translated by