MATLAB: How to reverse the direction of the rows and columns using printmat

columns in the bottomdecimalprintmatreverse rows

When I use this code:
Depth_of_cut = [1, 2, 3, 4];
Feedrate = [0.1, 0.2, 0.3, 0.4];
Fv = magic(4);
printmat(Fv,'Tangential Force, N', num2str(Depth_of_cut), num2str(Feedrate))
The result will be:
Tangential Force, N =
0.1 0.2 0.3 0.4
1 16.00000 2.00000 3.00000 13.00000
2 5.00000 11.00000 10.00000 8.00000
3 9.00000 7.00000 6.00000 12.00000
4 4.00000 14.00000 15.00000 1.00000
But I want it to be like:
Tangential Force, N =
4 4.00 14.00 15.00 1.00
3 9.00 7.00 6.00 12.00
2 5.00 11.00 10.00 8.00
1 16.00 2.00 3.00 13.00
0.1 0.2 0.3 0.4
So basically I would like to: 1. Reverse the rows to be started from the bottom to the top (The matrix and the rows numbers). 2. Put the columns numbers in the bottom of the table. 3. If there is a way to control the decimal using printmat would be good, otherwise it will be ok.
Thanks a lot,

Best Answer

Check out the flipud() function.