How to delect the zero values in table
Afficher commentaires plus anciens

There is a table in matlab, I want to know how to delete the entire row with zero values?
Many thanks in advance.
Réponse acceptée
Plus de réponses (1)
Fangjun Jiang
le 24 Mai 2021
Modifié(e) : Fangjun Jiang
le 24 Mai 2021
a=[1 2 3;0 0 0 ; 1 0 2];
index=all(a==0,2);
a(index,:)=[];
Catégories
En savoir plus sur Tables dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!