Hello, I have a matrix
A=[0.6 0.4 0.9 0.7;0.8 0.7 0.9 0.5;0.8 0.6 0.5 0.4;0.8 0.5 0.6 0.5]
I want to rearrange the rows in the matrix according sum of the row in a descending order. Here,
sum(row 1) = 2.6sum(row 2) = 2.9sum(row 3) = 2.3sum(row 4) = 2.4
Therefore, the new matrix becomes:
[row2;row1;row4;row3]
Thanks
Best Answer