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?

 Respuesta aceptada

dpb
dpb el 2 de Oct. de 2013
Editada: dpb el 2 de Oct. de 2013
x(~any(x(:,3:end),2),:)=[];

Más respuestas (1)

Andrei Bobrov
Andrei Bobrov el 2 de Oct. de 2013
Editada: Andrei Bobrov el 2 de Oct. de 2013
out = x(all(x(:,3:end),2),:);

Categorías

Más información sobre Creating and Concatenating Matrices en Centro de ayuda y File Exchange.

Preguntada:

el 2 de Oct. de 2013

Editada:

el 2 de Oct. de 2013

Community Treasure Hunt

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

Start Hunting!

Translated by