File Exchange

image thumbnail

ranker(data)

version 1.1.0.0 (791 Bytes) by R P
RANKER returns ranked position of DATA matrix, with the same line-row structure.

0 Downloads

Updated 30 Mar 2016

View License

Syntax: [ranked_data]=ranker(data);

Example: data=rand(3,2)
[ranked_data]=ranker(data)
Obs:
x=[1;10;100]
y=[4;3;70]
>> corr(x,y,'type','spearman')
ans =
0.5000

>> corr(ranker(x),ranker(y),'type','pearson')
ans =
0.5000

Cite As

R P (2019). ranker(data) (https://www.mathworks.com/matlabcentral/fileexchange/56244-ranker-data), MATLAB Central File Exchange. Retrieved .

Comments and Ratings (0)

Updates

1.1.0.0

Now it works for repeated data points. Check ranker([1 2 3 3 3 3 4])

1.0.0.0

image update

MATLAB Release Compatibility
Created with R13
Compatible with any release
Platform Compatibility
Windows macOS Linux