How do I remove rows in a matrix, that have zero in them?
Show older comments
My matrix is: 20 0 0 15 1 3 35 0 0 40 1 0 35 0 0 20 0 0 55 1 3
How do I remove the rows containing 0?
Answers (1)
Azzi Abdelmalek
on 15 Jan 2015
Edited: Azzi Abdelmalek
on 15 Jan 2015
A(any(A==0,2),:)=[]
1 Comment
Mathilde Engell
on 15 Jan 2015
Categories
Find more on MATLAB 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!