How to check if cell has particular value or not?

20 ビュー (過去 30 日間)
raghavendra kandukuri
raghavendra kandukuri 2019 年 5 月 22 日
編集済み: madhan ravi 2019 年 5 月 22 日
Hi,
I have variable named 'result1' which is basically 1*2 cell and i want to write condition saying.
Thanks in Advance
if result1="NaN" % either in index1 or index2
% do this cal
else
% do this cal
end

採用された回答

madhan ravi
madhan ravi 2019 年 5 月 22 日
contains() - if it contains "NaN" a string
isnan() - if it contains NaN value
  2 件のコメント
raghavendra kandukuri
raghavendra kandukuri 2019 年 5 月 22 日
Undefined function 'isnan' for input arguments of type 'cell'.
madhan ravi
madhan ravi 2019 年 5 月 22 日
編集済み: madhan ravi 2019 年 5 月 22 日
cellfun(@isnan,yourcell,'un',0)

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by