%% Create Timetable and Specify Variable Names
% Create a timetable and specify the names of the timetable variables. The vector of row times is a duration vector, whose units are seconds.

Time = seconds(1:5)';
TT = timetable(Time,[98;97.5;97.9;98.1;97.9],[120;111;119;117;116],...
               'VariableNames',{'Reading1','Reading2'})

%
% Starting in R2019b you can specify timetable 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.
% For example, use dates as the names of the timetable variables that contain the readings.

TT = timetable(Time,[98;97.5;97.9;98.1;97.9],[120;111;119;117;116],...
               'VariableNames',{'29-May-2019','30-May-2019'})

%
% To use dot notation when the name is not a valid identifier, include parentheses and quotation marks.

TT.('29-May-2019')

% Copyright 2012-2020 The MathWorks, Inc.