I found this via google search...
A function to calculate the percent rank of each element of a matrix is not available in MATLAB (as at end June 2009).
To work around this issue, use the function TIEDRANK from the Statistics Toolbox and normalize by dividing by the length of the input vector. This converts the result to percentiles.
eg. x = rand(1,40); tiedrank(x)/length(x);
