How to delect the zero values in table
이전 댓글 표시

There is a table in matlab, I want to know how to delete the entire row with zero values?
Many thanks in advance.
채택된 답변
추가 답변 (1개)
Fangjun Jiang
2021년 5월 24일
편집: Fangjun Jiang
2021년 5월 24일
a=[1 2 3;0 0 0 ; 1 0 2];
index=all(a==0,2);
a(index,:)=[];
카테고리
도움말 센터 및 File Exchange에서 Tables에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!