I'm writing a program that outputs a specific row of a matrix to the command window. However, I need to display it in a specific format as shown in the following:
Row: [2 4 6 8 10]
It should display the following:
1 (2%)
2 (4%)
3 (6%)
4 (8%)
5 (10%)
rather than just the answers in the command prompt as usual. Does anyone know of a way to do this in MATLAB? Thank you very much. Again, I have the calculation correct, I just don't know what tool to use to format it in the above way.