MATLAB: Sort from largest to smallest

sort

Dear all, I have this matrix:
A=[1 3
3 6
4 7
5 8
6 2
8 3
9 6]
Could you help me how to arrange the first colum from max to min

Best Answer

sort(A(:,1),'descend')
If you want to sort the matrix A by rows based on the first column, then e.g.
flipud(sortrows(A))
Or variations of the above based on what you want for output.
Related Question