isnan input arguments of type 'cell'

32 次查看(过去 30 天)
I am getting a cell error
a={'2' [NaN] '4' '5'}
isnan(a)
Undefined function 'isnan' for input arguments of type 'cell'.
How can I get around this error

采纳的回答

the cyclist
the cyclist 2012-6-28
cellfun(@isnan,a)
  2 个评论
Kavya Ashok
Kavya Ashok 2016-9-14
This returns the index of a where nan exists. What if you want Nan to be removed from the original array?

请先登录,再进行评论。

更多回答(1 个)

Debejyo Chakraborty
Sometimes this may be necessary: b = cellfun(@isnan,a,'UniformOutput',false);

类别

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