gives the rank of each element in a vector.
r = nan_ranks(X) r = nan_ranks(X,DIM) r = nan_ranks(X,Mode) r = nan_ranks(X,DIM,Mode)
vector or matrix, if X is a vector, return the vector of ranks of X adjusted for ties. if X is matrix, the rank is calculated along dimension DIM.
if X is matrix, the rank is calculated along dimension DIM . if DIM is zero or empty, the lowest dimension with more then 1 element is used.
implements the traditional algorithm with O(n^2) computational and O(n^2) memory effort
implements the traditional algorithm with O(n^2) computational and O(n) memory effort
implements an advanced algorithm with O(n*log(n)) computational and O(n.log(n)) memory effort
implements an advanced algorithm with O(n*log(n)) computational and O(n.log(n)) memory effort but without correction for ties This is the fastest algorithm
gives the rank of each element in a vector.
This program uses an advanced algorithm with averge effort O(m.n.log(n)) NaN in the input yields NaN in the output