正在加载图片...
●矩阵的排序:sortrows >matls=sortrows(mat1,1) >mat1s=sortrows(mat1) matls 0 1 0 0 1 0 1 g 54 3 2 1 5 2 1 5 7 9 0 7 9 0 >>help sortrovs SORTROWS Sort rows in ascending order. Y SORTROWS(X)sorts the rows of the matrix X in ascending order as a 类似excel中的排序 group.X is a 2-D numeric or char matrix.For a char matrix containing strings in each row,this is the familiar dictionary sort.When X is complex,the elements are sorted by ABS(X).Complex matches are further >at1=[1543:215:790:010] sorted by ANGLE(X).X can be any numeric or char class.Y is the same size and class as X. matl= SORIROWS (X,COL)sorts the matrix based on the columns specified in the vector COL.If an element of CoL is positive,the corresponding column 1 54 0 in X will be sorted in ascending order:if an element of CoL is negative, the corresponding column in X will be sorted in descending order.For 7 9 0 example,SORIROWS(X,[2 -3])sorts the rows of X first in ascending order 0 0 for the second column,and then by descending order for the third column.⚫ 矩阵的排序: sortrows 类似excel中的排序
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有