How to sort the data with respect to a column in matlab
301 views (last 30 days)
Show older comments
Lets say....A matrix PhysicalData is a 18X12 matrix. And i want to sort all the rows, in the ascending order of value in any column (Lets say 15th column). So the Row corresponding to the lowest value in 15th column should come first and so on. Please help me out. Thanks
0 Comments
Accepted Answer
Thomas
on 6 Nov 2012
doc sortrows
Suppose you want to sort matrix A according to the 15th column you would use
out=sortrows(A,15)
0 Comments
More Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!