sorting array without min and max

조회 수: 17 (최근 30일)
Ryan Littlejohn
Ryan Littlejohn 2019년 11월 23일
편집: the cyclist 2019년 11월 23일
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