%% Synchronize Timetables and Insert Missing Data Indicators
% Load two sample timetables from a file. Then synchronize their data to a vector of new row times.

load smallTT

%
% Display the timetables. TT1 has row times that are out of order. TT1 and TT2 have different variables.

TT1
TT2

%
% Synchronize TT1 and TT2. The output timetable, TT, contains all the row times from both timetables, in sorted order. In TT, Temp contains NaN for row times from TT2, and Pressure contains NaN for row times from TT1.

TT = synchronize(TT1,TT2)

% Copyright 2012 The MathWorks, Inc.