MATLAB 一问# Computation - 科学计算e*l2006-12-21 08:121 楼能不能把一个矩阵按其中一列作为 key 来排序?比方说:1 3 2x y z排序成:1 2 3x z y(x,y,z 为任意数字). 谢谢。
r*y2006-12-21 08:122 楼 Yes, you can. Let your matrix is A, you wanna sort with respect tothe row j, then[tmp, index] = sort(A(j, :))new_A = A(:, index)【在 e*******l 的大作中提到】: 能不能把一个矩阵按其中一列作为 key 来排序?比方说:: 1 3 2: x y z: 排序成:: 1 2 3: x z y: (x,y,z 为任意数字). 谢谢。