File Exchange Pick of the Week

Our best user submissions

ranker(data)

Will's pick this week is ranker(data) by R P.

They say it's the little things in life. I find this simple little function oddly compelling. Pass it a matrix, and it returns a similarly sized matrix that ranks the input's values from lowest to highest.



Be advised that this example comes with some limitations. It doesn't fully support:
  • Matrices of 3 or more dimensions
  • Imaginary numbers
  • 3 or more tie values
But for the most common use case, double precision values in a 1 or 2D array, it works great. Plus, it supports integers, strings, and chars.

Let us know what you think here or leave a comment for R P.
|
  • print

댓글

댓글을 남기려면 링크 를 클릭하여 MathWorks 계정에 로그인하거나 계정을 새로 만드십시오.