How to check if cell has particular value or not?

18 views (last 30 days)
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

Accepted Answer

madhan ravi
madhan ravi on 22 May 2019
contains() - if it contains "NaN" a string
isnan() - if it contains NaN value
  2 Comments
raghavendra kandukuri
raghavendra kandukuri on 22 May 2019
Undefined function 'isnan' for input arguments of type 'cell'.

Sign in to comment.

More Answers (0)

Categories

Find more on Numeric Types in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!