how sort just nonzero values?
Ältere Kommentare anzeigen
how can sort values except zero values i.e i want to sort just non zero values in c. how do that. c=[8 4 5 1 0 0 0 ];
thanks
Akzeptierte Antwort
Weitere Antworten (1)
Jonathan Sullivan
am 12 Mär. 2012
c=[8 0 5 0 1 0 4];
c_new = sort(c,'descend')
1 Kommentar
huda nawaf
am 12 Mär. 2012
Kategorien
Mehr zu Shifting and Sorting Matrices finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!