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 日

0 投票

cellfun(@isnan,a)

2 件のコメント

Rahul
Rahul 2012 年 6 月 28 日
thanks...
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
Debejyo Chakraborty 2016 年 7 月 20 日

4 投票

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

カテゴリ

ヘルプ センター および File Exchange で Numeric Types についてさらに検索

製品

タグ

質問済み:

2012 年 6 月 28 日

コメント済み:

2016 年 9 月 14 日

Community Treasure Hunt

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

Start Hunting!

Translated by