%% Preserve Original Names
% Starting in R2020a, you can take names from the input table or timetable and use them as variable names in the output table without modification. To preserve the original names, use the 'VariableNamingRule' name-value pair argument.
% Load a timetable and display it.

load bostonTT
Boston

%
% Reorient the timetable so that its row times become variable names in the output table. Convert the datetime values to strings and preserve the resulting names using the 'VariableNamingRule' name-value pair.

T = rows2vars(Boston,'VariableNamingRule','preserve')

%
% The variable names in T are not valid MATLAB identifiers because the dates start with a number. However, you can use dot notation to refer to such variables, using parentheses.

T.('2016-06-09 06:03:00')

% Copyright 2019 The MathWorks, Inc.