Skip to content

ranks2

  RANKS2 - Returns vector of ranks of X adjusted for ties, assuming ties rare

  Y = RANKS2(X)

  If X is a vector, return the (column) vector of ranks of
  X adjusted for ties.

  If X is a matrix, do the above for each column of X

  Some code from Octave 2.5.1
  Author: KH <Kurt.Hornik@ci.tuwien.ac.at>

  Modified 9/9/2004 by SDV for speed; assumes ties are rare.