Command Reference : Matrix Language Reference
  
 
@rowsort
Syntax: @rowsort(m[, order])
Argument1: matrix, m
Argument2: (optional) option, order
Return: matrix
Returns a matrix where each row contains the sorted values of the corresponding row of m. The option controls the direction of the ranking: “a” (ascending - default) or “d” (descending)
Example:
matrix a = @rowsort(m1, “d”)
See also @sort, @colsort, @ranks, @rapplyranks, @permute, and @rowranks.