Sort does not work
20 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Am I missing something very obvious or does the built-in sort function not work as it is supposed to?

0 Commenti
Risposta accettata
Stephan
il 8 Ott 2019
Modificato: Stephan
il 8 Ott 2019
Why? for me the indices are correct sorted. The smallest value is found at pos. 3 and the biggest value is found in pos. 4. What is the problem?
Note that the documentation says:
[B, I] = sort(X)
you changed it to:
[I, B] = sort(X)
So maybe what you expect to get is stored in variable I - not B...
0 Commenti
Più risposte (1)
Vedere anche
Categorie
Scopri di più su Shifting and Sorting Matrices in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!