www.gusucode.com > matlab 案例源码 matlab代码程序 > matlab/SynchronizeTimetablesWithIntersectingRowTimesExample.m
%% Synchronize Timetables with Intersecting Row Times % Load two sample timetables and synchronize their data to a vector of row % times they have in common. load(fullfile(matlabroot,'examples','matlab','intersectTT')); %% % Display the timetables. |TT1| and |TT2| have three rows and different variables. TT1 TT2 %% % Synchronize |TT1| and |TT2|, specifying |'intersection'| as the basis for % the row times of the output timetable. |TT| has only two rows because % |TT1| and |TT2| have only two row times in common. TT = synchronize(TT1,TT2,'intersection') %% % There is no need to interpolate or fill unmatched rows, because |TT1| and % |TT2| both have data for the row times they have in common.