Borrar filtros
Borrar filtros

Isolate data elements out of a column on NaNs

1 visualización (últimos 30 días)
Chelsey
Chelsey el 6 de Oct. de 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?

Respuesta aceptada

Fangjun Jiang
Fangjun Jiang el 6 de Oct. de 2011
a=[0 nan 1 nan];
b=a(~isnan(a))

Más respuestas (0)

Categorías

Más información sobre Creating and Concatenating Matrices en Help Center y File Exchange.

Etiquetas

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by