Azzera filtri
Azzera filtri

isnan input arguments of type 'cell'

28 visualizzazioni (ultimi 30 giorni)
Rahul
Rahul il 28 Giu 2012
Commentato: Kavya Ashok il 14 Set 2016
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

Risposta accettata

the cyclist
the cyclist il 28 Giu 2012
cellfun(@isnan,a)
  2 Commenti
Rahul
Rahul il 28 Giu 2012
thanks...
Kavya Ashok
Kavya Ashok il 14 Set 2016
This returns the index of a where nan exists. What if you want Nan to be removed from the original array?

Accedi per commentare.

Più risposte (1)

Debejyo Chakraborty
Debejyo Chakraborty il 20 Lug 2016
Sometimes this may be necessary: b = cellfun(@isnan,a,'UniformOutput',false);

Tag

Prodotti

Community Treasure Hunt

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

Start Hunting!

Translated by