Products & Services Solutions Academia Support User Community Company

Learn more about Statistics Toolbox   

summary - Class: dataset

Print summary of dataset array

Syntax

summary(A)
s = summary(A)

Description

summary(A) prints a summary of a dataset array and the variables that it contains.

s = summary(A) returns a scalar structure s that contains a summary of the dataset A and the variables that A contains. For more information on the fields in s, see Outputs.

Summary information depends on the type of the variables in the data set:

Outputs

The following list describes the fields in the structure s:

Examples

Summarize Fisher's iris data:

load fisheriris
species = nominal(species);
data = dataset(species,meas);
summary(data)
species: [150x1 nominal]
  setosa   versicolor   virginica
      50           50          50
meas: [150x4 double]
  min       4.3000         2         1    0.1000 
  1st Q     5.1000    2.8000    1.6000    0.3000 
  median    5.8000         3    4.3500    1.3000 
  3rd Q     6.4000    3.3000    5.1000    1.8000 
  max       7.9000    4.4000    6.9000    2.5000
 

Summarize the data in hospital.mat:

load hospital
summary(hospital)

Dataset array created from the data file hospital.dat.

The first column of the file ("id") is used for observation
names.  Other columns ("sex" and "smoke") have been 
converted from their original coded values into categorical
and logical variables.  Two sets of columns ("sys" and 
"dia", "trial1" through "trial4") have been combined into 
single variables with multivariate observations.  Column 
headers have been replaced with more descriptive variable 
names.  Units have been added where appropriate.


LastName: [100x1 cell string]
Sex: [100x1 nominal]
     Female      Male 
         53        47 

Age: [100x1 double, Units = Yrs]
     min      1st Q      median      3rd Q      max
      25         32          39         44       50

Weight: [100x1 double, Units = Lbs]
     min      1st Q         median        3rd Q        max
     111      130.5000      142.5000      180.5000     202

Smoker: [100x1 logical]
     true      false 
       34         66 

BloodPressure: [100x2 double, Units = mm Hg]
Systolic/Diastolic
     min              109           68 
     1st Q       117.5000      77.5000 
     median           122      81.5000 
     3rd Q       127.5000           89 
     max              138           99 

Trials: [100x1 cell, Units = Counts]
From zero to four measurement trials performed

See Also

get, set, grpstats

  


Recommended Products

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.

 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS