Problem 47508. Convert sorting indices to ranks

Solution 3669928

Submitted on 16 Nov 2020 by Rafael S.T. Vieira
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

Test Suite

Test Status Code Input and Output
1   Pass
RawVector=rand(10,1); [SortedVector,SortingIndices]=sort(RawVector); Ranks=SortingIndices2Ranks(SortingIndices); assert(isequal(SortedVector(Ranks),RawVector));

Suggested Problems

More from this Author5

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!