www.gusucode.com > matlab 案例源码 matlab代码程序 > matlab/OuterJoinOperationOfTimetablesExample.m
%% Outer-Join Operation of Timetables % Create two timetables, |A| and |B|. They have some row times in common, % but each also includes row times that are not in the other timetable. A = timetable(seconds([1;2;4;6]),[1 2 3 11]') %% B = timetable(seconds([2;4;6;7]),[4 5 6 7]') %% % Combine |A| and |B| with an outer join. |C| matches up the rows with % common row times, but also includes the rows that do not have matches. C = outerjoin(A,B) %% % Combine |A| and |B|, but ignore rows in |B| whose row times do not match % any row times in |A|. D = outerjoin(A,B,'Type','left')