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

 Akzeptierte Antwort

the cyclist
the cyclist am 28 Jun. 2012

0 Stimmen

cellfun(@isnan,a)

2 Kommentare

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

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (1)

Debejyo Chakraborty
Debejyo Chakraborty am 20 Jul. 2016

4 Stimmen

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

Kategorien

Mehr zu Data Type Identification finden Sie in Hilfe-Center und File Exchange

Produkte

Tags

Gefragt:

am 28 Jun. 2012

Kommentiert:

am 14 Sep. 2016

Community Treasure Hunt

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

Start Hunting!

Translated by