%% Convert groupedData to Table
% Load the sample data set.

load pheno.mat ds

%
% Create a groupedData object from the data set ds.

grpData = groupedData(ds);

%
% Display the object properties.

grpData.Properties

% GroupVariableName and IndpendentVariableName have been automatically assigned to 'ID' and 'Time', respectively.
%
% Convert the groupedData to a table.

tbl = groupedData2table(grpData);

%
% Display the first 5 rows of the table.

tbl(1:5,:)

% Copyright 2012 The MathWorks, Inc.