Home > NaN > ranks.m

ranks

PURPOSE ^

RANKS gives the rank of each element in a vector.

SYNOPSIS ^

function r = ranks(X,DIM,Mode);

DESCRIPTION ^

 RANKS 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.
 
 r = ranks(X[,DIM])
   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 DIM is zero or empty, the lowest dimension with more then 1 element is used. 
 r = ranks(X,DIM,'traditional')
   implements the traditional algorithm with O(n^2) computational 
   and O(n^2) memory effort
 r = ranks(X,DIM,'mtraditional')
   implements the traditional algorithm with O(n^2) computational 
   and O(n) memory effort
 r = ranks(X,DIM,'advanced   ')
   implements an advanced algorithm with O(n*log(n)) computational 
   and O(n.log(n)) memory effort

 see also: CORRCOEF, SPEARMAN, RANKCORR

 REFERENCES:
 --

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:
Generated on Fri 22-May-2009 15:13:00 by m2html © 2003