I have an array called A, it has 2 Rows and 56 columns ( as shown in the attached image)
the first row represents the values while the second row represents the index for each value.
I want to sort the first row but keep the index for each value (I tried to use Sort function but it doesnt keep the index of each value in the second row). for example, let's suppose I have this matrix
input x=[9 2 4 3 ;3 1 8 2 ]
i want the output looks like this y=[2 3 4 9; 1 2 8 3 ];

sortrows:y=sortrows(x')'- Adielx=[1 1 1 2 2 3;1 2 1 4 7 1]- rahnema1