查看单个帖子
旧 2008-12-27, 16:01   #1
xiezhh
普通会员
 
注册日期: 2007-08-07
帖子: 64
声望力: 20
xiezhh 是一个将要出名的人
默认 回复: [求助]关于matlab排序的问题!

用sortrows函数,自己看帮助,

B = sortrows(A,column) sorts the matrix based on the columns specified in the vector column. If an element of column is positive, the MATLAB? software sorts the corresponding column of matrix A in ascending order; if an element of column is negative, MATLAB sorts the corresponding column in descending order. For example, sortrows(A,[2 -3]) sorts the rows of A first in ascending order for the second column, and then by descending order for the third column.
xiezhh 当前离线   回复时引用此帖