------------------------------------------------------------------------------- help formatvsort-------------------------------------------------------------------------------

Sort vector

matvsortinput_vectoroutput_vector[,decrease]

Description

matvsortsortsinput_vector(a 1 Xcmatrix or anrX 1 matrix) into numeric order and puts the resulting vector intooutput_vector.input_vectorandoutput_vectormay have the same name.

Options

decreasespecifies that values should be in decreasing order. The default is increasing order.

Remarks

matvsortmay make it easier to identify the smallest or largest element(s) of a vector. If a vectorbhas been sorted into increasing order, its smallest element is accessible asb[1,1]and its largest asb[1,colsof(b)]ifbis a row vector andb[rowsof(b),1]ifbis a column vector.The corresponding names are accessible as for example

local c1name : word 1 of `: colnames b'

Examples

. matvsort A B

AuthorNicholas J. Cox, University of Durham, U.K. n.j.cox@durham.ac.uk

Also seeOnline: help for matrix