MATLAB: Lables for Matrix columns

matrix

I have a 4×4 matrix
Matrix: data_2 = [steps; x; y; z_alt]'
How to I label and display each of the columns as "steps x y z_alt" respectively

Best Answer

fprintf('%.10s %.10s %.10s %.10s\n', 'steps', 'x', 'y', 'z');
fprintf('%.10g %.10g %.10g %.10g\n', data_2.' );   %transpose is important