请问怎么让具有两列元素的矩阵按照行之和的大小顺序排列?。
Show older comments
比如矩阵:A=[1,2;
6,4;
2,7];
A每行的和形成的矩阵就是[3,12,9];
想要的效果是排序之后为
[1,2;
2,7;
6,4];
我看到sort是会对每列排序,达不成这样的效果,请问有什么简单直接一些的方法吗?
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!