How to check if cell has particular value or not?

20 vues (au cours des 30 derniers jours)
raghavendra kandukuri
raghavendra kandukuri le 22 Mai 2019
Modifié(e) : madhan ravi le 22 Mai 2019
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

Réponse acceptée

madhan ravi
madhan ravi le 22 Mai 2019
contains() - if it contains "NaN" a string
isnan() - if it contains NaN value
  2 commentaires
raghavendra kandukuri
raghavendra kandukuri le 22 Mai 2019
Undefined function 'isnan' for input arguments of type 'cell'.
madhan ravi
madhan ravi le 22 Mai 2019
Modifié(e) : madhan ravi le 22 Mai 2019
cellfun(@isnan,yourcell,'un',0)

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Numeric Types dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by