Isolate data elements out of a column on NaNs

1 次查看(过去 30 天)
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 中查找有关 Creating and Concatenating Matrices 的更多信息

产品

Community Treasure Hunt

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

Start Hunting!

Translated by