www.gusucode.com > matlab 案例源码 matlab代码程序 > matlab/DetermineWhetherWorkspaceVariableIsTimetableExample.m
%% Determine If Workspace Variable is Timetable % Create a timetable and verify that it is a timetable. Date = datetime({'2015-12-18';'2015-12-19';'2015-12-20'}); Temp = [37.3;39.1;42.3]; Pressure = [29.4;29.6;30.0]; Precip = [0.1;0.9;0.0]; TT = timetable(Date,Temp,Pressure,Precip) %% TF = istimetable(TT) %% % Convert |TT| to a table, |T|. The |istimetable| function returns |0| % because |T| is not a timetable. T = timetable2table(TT); TF = istimetable(T)