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

 채택된 답변

the cyclist
the cyclist 2012년 6월 28일

0 개 추천

cellfun(@isnan,a)

댓글 수: 2

Rahul
Rahul 2012년 6월 28일
thanks...
Kavya Ashok
Kavya Ashok 2016년 9월 14일
This returns the index of a where nan exists. What if you want Nan to be removed from the original array?

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Debejyo Chakraborty
Debejyo Chakraborty 2016년 7월 20일

4 개 추천

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

카테고리

도움말 센터 및 File Exchange에서 Numeric Types에 대해 자세히 알아보기

제품

태그

질문:

2012년 6월 28일

댓글:

2016년 9월 14일

Community Treasure Hunt

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

Start Hunting!

Translated by