Sort in ascending order for first column then descending order for the second column.
14 次查看(过去 30 天)
显示 更早的评论
Hi,
A=[1 1 1;
3 2 1;
1 3 1]
is there a way in matlab to sort rows of a matrix based on ascending order for the first column and then descending order for the second column, so the final matrix will look like this:
A=[1 3 1;
1 1 1;
3 2 1]
0 个评论
采纳的回答
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Shifting and Sorting Matrices 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!