How do I remove rows in a matrix, that have zero in them?

1 view (last 30 days)
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
Azzi Abdelmalek on 15 Jan 2015
Edited: Azzi Abdelmalek on 15 Jan 2015
A(any(A==0,2),:)=[]

Categories

Find more on Multidimensional Arrays in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!