How to delect the zero values in table
Mostrar comentarios más antiguos

There is a table in matlab, I want to know how to delete the entire row with zero values?
Many thanks in advance.
Respuesta aceptada
Más respuestas (1)
Fangjun Jiang
el 24 de Mayo de 2021
Editada: Fangjun Jiang
el 24 de Mayo de 2021
a=[1 2 3;0 0 0 ; 1 0 2];
index=all(a==0,2);
a(index,:)=[];
Categorías
Más información sobre Tables en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!