clear; load ctr.mat A X = A(:,1); [xed,xh]=sort(X); [m,n]=size(A); C = []; for i = 1 : m B = A(xh(m-i+1),1:n); C = [C;B]; end num2str([(1 : m)' C])