sort
- :
b =sort(a)¶ - :
b =sort(a, dim)¶ - :
b =sort(a, mode)¶ - :
b =sort(a, dim, mode)¶ - :
[b, i] =sort(…)¶ Sort the elements of a along a dimension. mode is
"ascend"(default) or"descend". The sort is stable; NaN is placed last for ascending and first for descending order. Cell arrays of character vectors are sorted as strings. The second output holds the original positions.