how to sort a matrix in matlab

92 Views Asked by At

I have matrix like=

1 10 2 0 1 5 9 7 50

5 7 13 87 3 10 9 54 90

60 2 25 16 0 1 0 25 3

but after sorting the matrix will look like

0 1 1 2 5 7 9 10 50

3 5 7 9 10 13 54 87 94

0 0 1 2 3 16 25 25 60

But i am unable to do this in MATLAB.It would be great if anyone help me.

1

There are 1 best solutions below

3
On

$\mathtt{help\,\ sort}$:

SORT(X,DIM) sorts along the dimension DIM.