Answers for "matlab sort list"

0

matlab sort list

A = [9 0 -7 5 3 8 -10 4 2];
B = sort(A)
Sorts the array in ascending order
B = sort(A,'descend')
Sorts the array in descending order
Both work with matrices too:
Posted by: Guest on October-18-2021

Browse Popular Code Answers by Language