www.gusucode.com > matlab 案例源码 matlab代码程序 > matlab/DisplayMatrixWithColumnLabelsExample.m

    %% Display Matrix with Column Labels
%%
% Display a matrix and label the columns as |Corn|, |Oats|, and |Hay|.

% Copyright 2015 The MathWorks, Inc.

X = rand(5,3);
disp('     Corn      Oats      Hay')
disp(X)