%% Specify Variable Names Using Any Characters
% Starting in R2019b, you can specify table variable names that are not valid MATLAB® identifiers. Such variable names can include spaces, non-ASCII characters, and can have any character as the leading character. When you access such a variable name, enclose it quotation marks.
% Create a table that stores data about a set of patients. Start with their ages and status as smokers.

Age = [38;43;38;40;49];
Smoker = logical([1;0;1;0;1]);
Height = [71;69;64;67;64];
Weight = [176;163;131;133;119];
BloodPressure = [124 93; 109 77; 125 83; 117 75; 122 80];
T = table(Age,Smoker)

%
% Add the blood pressure readings with the variable name '29-May-2019 Blood Pressure Reading'. You can use dot syntax to add or access the variable. Since its name is not a valid MATLAB identifier, use parentheses and quotation marks with dot syntax.

T.('29-May-2019 Blood Pressure Reading') = BloodPressure

%
% When table variable names are valid MATLAB identifiers, you can use dot syntax without parentheses and quotation marks.

T.Height = Height;
T.Weight = Weight

%
% Index into T using variable names.

T(:,{'Age','Smoker','29-May-2019 Blood Pressure Reading'})

%
%
% Copyright 2019 The MathWorks, Inc.