<< size_of Utilities

Scilab Scholar module for schools >> Utilities > sort

sort

sorts a vector in increasing or decreasing order

w = sort(v,order)

Arguments

v

vector

order

">" or "<"

w

vector

Description

sort(v) or sort(v,">") returns the sorted vector of numbers v in increasing order or the vector of character strings v in alphabetical order.

sort(v,"<") returns the sorted vector of numbers v in decreasing order or the vector of character strings v in reverse alphabetical order.

Examples

v=[1,5,2,8,3]
sort(v)
sort(v,"<")
<< size_of Utilities