How to sort one side of a matrix?
Show older comments
Here is my issue, I have to organize a column vector in descending order, however I need to assign another vector to it without sorting that one.
i.e.
- 92.5, 3005
- 100, 6998
- 98.3, 5412
Needs to be written as
- 100, 6998
- 98.3, 5412
- 92.5, 3005
The two colums are separate vectors, but I saved them to one matrix by using x=[scores, IDnumbers]
Once I get them organized properly, I need to display them both using one disp() command.
How do I organize the right side while keeping the same IDs with their respective scores?
Accepted Answer
More Answers (0)
Categories
Find more on Shifting and Sorting Matrices in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!