美文网首页
MATLAB:矩阵排序问题(sort/sortrows)

MATLAB:矩阵排序问题(sort/sortrows)

作者: 彤小白 | 来源:发表于2019-01-23 21:59 被阅读0次

(1)对矩阵的每行进行升序排序:sort(A,2)


(2)对矩阵的每列进行升序排序:sort(A,1)

(3)对整个矩阵按第一列进行升序排序:sortrows(A,1)

(4) 按第二列对矩阵进行升序排序:sortrows(A,2)

(4) 按第一列对矩阵进行降序排序:sortrows(A,-1)

相关文章

网友评论

      本文标题:MATLAB:矩阵排序问题(sort/sortrows)

      本文链接:https://www.haomeiwen.com/subject/rgasjqtx.html