sorting a matrix column with the corresponding row
Show older comments
I have a matrix that contains ( 6 rows, 2 columns) as shown in the attached image.

I'd like to have a new matrix (in MATLAB) that contains the second columns arranged in ascending order, but would like to keep their corresponding values in the in the row. for example: the output matrix looks like this

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!