isnan input arguments of type 'cell'

I am getting a cell error
a={'2' [NaN] '4' '5'}
isnan(a)
Undefined function 'isnan' for input arguments of type 'cell'.
How can I get around this error

 Réponse acceptée

the cyclist
the cyclist le 28 Juin 2012

0 votes

cellfun(@isnan,a)

2 commentaires

Rahul
Rahul le 28 Juin 2012
thanks...
Kavya Ashok
Kavya Ashok le 14 Sep 2016
This returns the index of a where nan exists. What if you want Nan to be removed from the original array?

Connectez-vous pour commenter.

Plus de réponses (1)

Debejyo Chakraborty
Debejyo Chakraborty le 20 Juil 2016

4 votes

Sometimes this may be necessary: b = cellfun(@isnan,a,'UniformOutput',false);

Catégories

En savoir plus sur Data Type Identification dans Centre d'aide et File Exchange

Produits

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by