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

    %% Summary of Table  

%% 
% Create a table. 
load patients
BloodPressure = [Systolic Diastolic];
T = table(Gender,Age,Smoker,BloodPressure,'RowNames',LastName);  

%% 
% Add descriptions and units to table |T|. 
T.Properties.Description = 'Simulated patient data';
T.Properties.VariableUnits =  {''  'Yrs' ''  'mm Hg'};
T.Properties.VariableDescriptions{4} = 'Systolic/Diastolic';  

%% 
% Print a summary of table |T|. 
format compact

summary(T) 

%%
% |summary| displays the minimum, median, and maximum values for each column
% of the variable |BloodPressure|.