[m,n]=size(y);
y1 = reshape(y,1,[]);
y2 = sort(y1,'descend');
y3 = reshape(y2,m,n); %把矩阵y的元素按照从大到小排列
A=reshape(sort(reshape(abs(y),1,[]),'descend'),3,3) %3*3的矩阵排序
[m,n]=size(y);
y1 = reshape(y,1,[]);
y2 = sort(y1,'descend');
y3 = reshape(y2,m,n); %把矩阵y的元素按照从大到小排列
A=reshape(sort(reshape(abs(y),1,[]),'descend'),3,3) %3*3的矩阵排序