<< nan_range Descriptive Statistics nan_rms >>

NaN Toolbox >> NaN Toolbox > Descriptive Statistics > nan_ranks

nan_ranks

gives the rank of each element in a vector.

Calling Sequence

r = nan_ranks(X)
r = nan_ranks(X,DIM)
r = nan_ranks(X,Mode)
r = nan_ranks(X,DIM,Mode)

Parameters

X:

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.

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.

Mode = 'traditional' :

implements the traditional algorithm with O(n^2) computational and O(n^2) memory effort

Mode = 'mtraditional' :

implements the traditional algorithm with O(n^2) computational and O(n) memory effort

Mode = 'advanced ' :

implements an advanced algorithm with O(n*log(n)) computational and O(n.log(n)) memory effort

Mode = 'advanced-ties':

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

r :

gives the rank of each element in a vector.

Description

This program uses an advanced algorithm with averge effort O(m.n.log(n)) NaN in the input yields NaN in the output

See also

Authors


<< nan_range Descriptive Statistics nan_rms >>