How to delect the zero values in table
Ältere Kommentare anzeigen

There is a table in matlab, I want to know how to delete the entire row with zero values?
Many thanks in advance.
Akzeptierte Antwort
Weitere Antworten (1)
Fangjun Jiang
am 24 Mai 2021
Bearbeitet: Fangjun Jiang
am 24 Mai 2021
a=[1 2 3;0 0 0 ; 1 0 2];
index=all(a==0,2);
a(index,:)=[];
Kategorien
Mehr zu Tables finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!