I have created a matrix of calculated values and would like to add row and column headings as illustrated in the attached file. I know that you need to convert the matrix to a string value but I don't know how to add in the headings. How would you go about doing this?
Comments
R1 = {'Station 0', 'Station 1', 'Station 2'};
C1 = {'Mach', 'P', 'T'};
val = [.8 .5 .32
300000 38551.44 67304.94
230 317.18 786];
t = sprintf(' %s %s %s', R1{1}, R1{2}, R1{2});
r = sprintf('%s %f %f %f', C1{1}, val(1), val(4), val(7));
{t; r}
modify it to your needs...
type 'help sprintf' on your command window to see its
description