Rank matrix elements in descending order
5 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Fred John
am 27 Jan. 2015
Bearbeitet: Image Analyst
am 27 Jan. 2015
Hi!
I have a matrix from which I want the elements to be moved to a table where the elements are sorted via descending order. Can I do this using the av_output command? Or something else?
Thanks!
0 Kommentare
Akzeptierte Antwort
Image Analyst
am 27 Jan. 2015
Bearbeitet: Image Analyst
am 27 Jan. 2015
Why not just use the sort() function?
m=magic(5);
% Sort columns in descending order.
sorted_m = sort(m, 'descend')
0 Kommentare
Weitere Antworten (0)
Siehe auch
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!