sorting array without min and max

2 visualizaciones (últimos 30 días)
Ryan Littlejohn
Ryan Littlejohn el 23 de Nov. de 2019
Editada: the cyclist el 23 de Nov. de 2019
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 comentario
Adam Danz
Adam Danz el 23 de Nov. de 2019
Editada: Adam Danz el 23 de Nov. de 2019
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.

Iniciar sesión para comentar.

Respuestas (1)

the cyclist
the cyclist el 23 de Nov. de 2019
Editada: the cyclist el 23 de Nov. de 2019
Take your pick: Sorting algorithms
Enjoy this video as well.

Categorías

Más información sobre Shifting and Sorting Matrices en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by