Sort matrix by ratios of the adjacent column
Show older comments
imagine I have a matrix [1, 5; 1, 2; 1, 3]; and I want to rearrange the matrix depending on its ratio with between the two columns so the output is [1, 5; 1, 3; 1, 2];
3 Comments
Image Analyst
on 25 Sep 2018
Um, bad example. Your input AND output are identical: [1, 5; 1, 2; 1, 3]
Did you make a mistake?
Salvador Aristides
on 25 Sep 2018
Image Analyst
on 25 Sep 2018
OK, I also updated my answer below.
Accepted Answer
More Answers (0)
Categories
Find more on Shifting and Sorting Matrices in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!