Arranging values from highest to lowest using sort function Matlab

10 次查看(过去 30 天)
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);

采纳的回答

Voss
Voss 2021-12-3
sort_a = sort(a,'descend');

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 MATLAB Compiler 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by