MATLAB: Sorting matrix

sortsortrows

hi i have a matrix as follows a =
2 3 4
4 3 2
1 2 3
>> sort(a)
ans =
1 2 2
2 3 3
4 3 4
i want to sort the matrix as follows
1 2 3
2 3 4
4 3 2
how to do this?

Best Answer

sortrows(a)
Related Question