Command Reference : Function Reference : Function Reference: C
  
 
@colsort
Sort each column of the matrix.
Syntax: @colsort(m[, o])
m: matrix, vector
o: (optional) string
Return: matrix, vector
Returns a matrix where each column contains the sorted values of the corresponding column of m.
The option o controls the direction of the ranking: ā€œaā€ (ascending - default) or ā€œdā€ (descending).
Examples
Let M1 be a matrix. Then
= @colsort(m1, "d")
returns a matrix whose i-th column is the sorted (from largest at the top to smallest at the bottom) version of the i-th column in M1.
Cross-references
See also @sort and @rowsort.
See also @ranks, @colranks, and @rowranks.
See also @capplyranks and @rapplyranks.