sort

From STX Wiki
Jump to navigationJump to search

Sort the vector or matrix x.


Usage
sort(type, x {, i })
mode
specifies the sort direction and the row or column containing the data to be sorted
x
vector or matrix to be sorted
i
row or column containing the sort data; depends ion type (default=0)
Result
The sorted vector or matrix x.
i | description
column index | sort rows of x ascending by the values of column i
column index | sort rows of x descending by the values of column i
row index | sort columns of x acending by the values of row i
row index | sort columns of x descending by the values of row i


See also
median, sample, shuffle

<function list>

Navigation menu

Personal tools