Rank matrix elements in descending order

조회 수: 2 (최근 30일)
Fred John
Fred John 2015년 1월 27일
편집: Image Analyst 2015년 1월 27일
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