"Nir" wrote in message <kd1c0h$1pl$1@newscl01ah.mathworks.com>...
> Dear all,
>
> Here is a one-liner for getting ranks with ties:
> [~,rank_vector]=ismember(data_vector,unique(sort(data_vector)));
>
Or simply:
[~,~,rank_vector] = unique(data_vector)
% Bruno
> Dear all,
>
> Here is a one-liner for getting ranks with ties:
> [~,rank_vector]=ismember(data_vector,unique(sort(data_vector)));
>
Or simply:
[~,~,rank_vector] = unique(data_vector)
% Bruno