How to deal with this
조회 수: 2 (최근 30일)
이전 댓글 표시
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
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
2013년 3월 13일
find( any(isnan(YourMatrix)) )
and
YourMatrix(:, any(isnan(YourMatrix))) = [];
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Function Definition에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!