sorting array without min and max

2 次查看(过去 30 天)
hi just wondering how i can sort a given matrix A = [3 4 2 5 1] from highest to lowest without using the matlab min and max function
  1 个评论
Adam Danz
Adam Danz 2019-11-23
编辑:Adam Danz 2019-11-23
Hint: there's a matlab function that does exactly that and the function's name is one of the first 10 words in your question. You'll have to tell this function to use 'descend' order which is explained on this function's documentation page.

请先登录,再进行评论。

回答(1 个)

the cyclist
the cyclist 2019-11-23
编辑:the cyclist 2019-11-23
Take your pick: Sorting algorithms
Enjoy this video as well.

类别

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