Delete Rows with a specific condition

I have a matrix and I want to delete all rows that have ZEROS from columns 3 to end. How do?

 Risposta accettata

dpb
dpb il 2 Ott 2013
Modificato: dpb il 2 Ott 2013
x(~any(x(:,3:end),2),:)=[];

Più risposte (1)

Categorie

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by