필터 지우기
필터 지우기

How to deal with this

조회 수: 2 (최근 30일)
dav
dav 2013년 3월 13일
Hi,
I have a large matrix that is generated in a simulation.
I have noticed that some of the columns are NAN (entire column).
Is there a way to
1) get the number of columns with NAN
2) delete the columns with NAN values
Thanks
  댓글 수: 1
Walter Roberson
Walter Roberson 2013년 3월 13일
You are not generating code. Please read the guide to tags and retag this question. http://www.mathworks.co.uk/matlabcentral/answers/43073-a-guide-to-tags

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

채택된 답변

Walter Roberson
Walter Roberson 2013년 3월 13일
find( any(isnan(YourMatrix)) )
and
YourMatrix(:, any(isnan(YourMatrix))) = [];

추가 답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by