Rank matrix elements in descending order

3 次查看(过去 30 天)
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!

采纳的回答

Image Analyst
Image Analyst 2015-1-27
编辑:Image Analyst 2015-1-27
Why not just use the sort() function?
m=magic(5);
% Sort columns in descending order.
sorted_m = sort(m, 'descend')

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Shifting and Sorting Matrices 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by