isnan input arguments of type 'cell'

조회 수: 31 (최근 30일)
Rahul
Rahul 2012년 6월 28일
댓글: Kavya Ashok 2016년 9월 14일
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일
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일
Sometimes this may be necessary: b = cellfun(@isnan,a,'UniformOutput',false);

카테고리

Help CenterFile Exchange에서 Logical에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by