isnan input arguments of type 'cell'

34 ビュー (過去 30 日間)
Rahul
Rahul 2012 年 6 月 28 日
コメント済み: Kavya Ashok 2016 年 9 月 14 日
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 件のコメント
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 日
Sometimes this may be necessary: b = cellfun(@isnan,a,'UniformOutput',false);

カテゴリ

Help Center および File ExchangeLogical についてさらに検索

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by