Ranking of elements of a vector

I think they mean the inverse of sortperm, the solution would be invperm(sortperm(A)).

1 Like