Delete Rows with a specific condition
Show older comments
I have a matrix and I want to delete all rows that have ZEROS from columns 3 to end. How do?
Accepted Answer
More Answers (1)
Andrei Bobrov
on 2 Oct 2013
Edited: Andrei Bobrov
on 2 Oct 2013
out = x(all(x(:,3:end),2),:);
Categories
Find more on Creating and Concatenating Matrices in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!