Functions > Vector and Matrix > Other Array Functions > Ranking Vectors
  
Ranking Vectors
Rank(v)—Returns a vector corresponding to the sorted positions of each element of vector v.
The rank of the first entry is always 1. For repeated values, Rank returns an average of the indices where the values occur after sorting. The imaginary parts of the elements of v are ignored.
order(v) Returns the index in which the elements of vector v occur if sorted. Multiple entries generate sequential indices based on their original priority in the data. The indices returned are relative to ORIGIN.
Arguments
v is a vector of real or complex numbers.
Additional Information
Rank should not be confused with the function rank, which returns the rank of an array.