How to check if cell has particular value or not?

15 次查看(过去 30 天)
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

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Cell Arrays 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by