sort(X) returns a row vector containing the indices which would select elements of X in increasing order. The indices are based on the current index origin, and if X is a matrix, apply to X(:).