%% Convert Cell Array to Table
% Create a cell array containing character vectors and numeric data.

C = {5 'cereal' 110 'C+'; 12 'pizza' 140 'B';...
    23 'salmon' 367 'A'; 2 'cookies' 160 'D'}

%
% Convert the cell array, C, to a table and specify variable names.

T = cell2table(C,...
    'VariableNames',{'Age' 'FavoriteFood' 'Calories' 'NutritionGrade'})

% The variables T.Age and T.Calories are numeric while the variables T.FavoriteFood and T.NutritionGrade are cell arrays of character vectors.
% Copyright 2012 The MathWorks, Inc.