How can I remove zeroes column from matrix without removing NaN column?
조회 수: 2 (최근 30일)
이전 댓글 표시
Hi All,
I have matrix contains zeroes columns and NaN columns and numbers columns, I want to remove [JUST zeroes columns] without removing NaN columns,
Thanks in advance,
Riyadh
댓글 수: 0
채택된 답변
madhan ravi
2019년 1월 4일
편집: madhan ravi
2019년 1월 4일
matrix(:,~any(matrix==0,1))
% or
matrix(:,any(matrix==0,1))=[]
댓글 수: 7
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Logical에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!