Filter löschen
Filter löschen

Matrix sorting re-size problem

1 Ansicht (letzte 30 Tage)
satendra kumar
satendra kumar am 9 Nov. 2012
Hi everyone, Lets say i have a matrix a=[1 2 3; 1 0 3; 2 3 5; 1 0 5] like that i have 1000 rows. Now i want to remove the rows whose second column element is 0. i.e. if(a(i,2)==0) then remove it. Pls help me out of this. Thanks

Akzeptierte Antwort

Srinivas
Srinivas am 9 Nov. 2012
a(a(:,2) ==0,:) = []
  1 Kommentar
satendra kumar
satendra kumar am 9 Nov. 2012
Thanks a lot man. You saved my life

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Shifting and Sorting Matrices finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by