Convert sorting indices to ranks - MATLAB Cody - MATLAB Central

Problem 47508. Convert sorting indices to ranks

Difficulty:Rate
The second output of sort() is the sorting index vector, telling where the corresponding element in the sorted vector was in the raw vector. However sometimes we want to know where the elements of the raw vector goes into the sorted vector, i.e., ranks.
Can you find the shortest solution?

Solution Stats

61.9% Correct | 38.1% Incorrect
Last Solution submitted on Jun 02, 2024

Problem Comments

Solution Comments

Show comments
R2025a Pre-release highlights
This topic is for discussing highlights to the current R2025a Pre-release.
12
4

Problem Recent Solvers12

Suggested Problems

More from this Author12

Problem Tags

Community Treasure Hunt

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

Start Hunting!
Go to top of page