Effacer les filtres
Effacer les filtres

Arranging values from highest to lowest using sort function Matlab

4 vues (au cours des 30 derniers jours)
Teoman Selcuk
Teoman Selcuk le 3 Déc 2021
Réponse apportée : Voss le 3 Déc 2021
Since the sort function sorts the array from the lowest to highest how would I be able to sort an array from the highest to lowest? SO I want to get the inverse of the sort function how is that doable?
a = [6,3,4,11];
sort_a = sort(a);

Réponse acceptée

Voss
Voss le 3 Déc 2021
sort_a = sort(a,'descend');

Plus de réponses (0)

Catégories

En savoir plus sur MATLAB Compiler dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by