How to check if cell has particular value or not?
16 次查看(过去 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
0 个评论
采纳的回答
madhan ravi
2019-5-22
contains() - if it contains "NaN" a string
isnan() - if it contains NaN value
2 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Numeric Types 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!