|
Hi everyone
I'd like to know if there is any instruction in matlab to sort a matrix like this example:
X =[ 0.506 0.258 0.478
201 203 202]
x_sorted = [0.258 0.478 0.506
203 202 201]
What I am looking for is to sort the first row in ascend way and moving the value on the second row which belongs to each first row index. For instance, if 0.506 is the maximum value on first row, put it into the last place and moving 201 with it.
I don't know whether this is possible or not.
Does anyone know how to do it?
Many thanks in advance
Regards.
|