sort

Type: External

Group: matrix

Syntax

sort(a)
[x,y]=sort(A)

Description

sorting of vectors and arrays.

Examples

sort([6,2,9])   -> [2,6,9]
sort([5,1;2,3]) -> [2,1; 5,3]
[x,y]=sort([3,7,4;2,9,1]) -> x=[2,7,1;3,9,4]  y=[2,1,2;1,2,1]

See Also

find