How to delect the zero values in table
Show older comments

There is a table in matlab, I want to know how to delete the entire row with zero values?
Many thanks in advance.
Accepted Answer
More Answers (1)
Fangjun Jiang
on 24 May 2021
Edited: Fangjun Jiang
on 24 May 2021
a=[1 2 3;0 0 0 ; 1 0 2];
index=all(a==0,2);
a(index,:)=[];
Categories
Find more on Tables in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!