Borrar filtros
Borrar filtros

How to check if cell has particular value or not?

18 visualizaciones (últimos 30 días)
raghavendra kandukuri
raghavendra kandukuri el 22 de Mayo de 2019
Editada: madhan ravi el 22 de Mayo de 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

Respuesta aceptada

madhan ravi
madhan ravi el 22 de Mayo de 2019
contains() - if it contains "NaN" a string
isnan() - if it contains NaN value
  2 comentarios
raghavendra kandukuri
raghavendra kandukuri el 22 de Mayo de 2019
Undefined function 'isnan' for input arguments of type 'cell'.
madhan ravi
madhan ravi el 22 de Mayo de 2019
Editada: madhan ravi el 22 de Mayo de 2019
cellfun(@isnan,yourcell,'un',0)

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Cell Arrays en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by