gusucode.com > datatypes 工具箱matlab源码程序 > datatypes/@timetable/postjoin.m

    function c = postjoin(c,a,b,type,leftVarDim)
%POSTJOIN function called by join, innerjoin and outerjoin
%   Copyright 2016 The MathWorks, Inc.

if isa(a,'timetable') && isa(b,'timetable')
    % Remove the time variable from the joined table.
    rowTimesIndex = leftVarDim.length; % The time will always be at the end of the left variables
    
    if ~strcmp(type,'simple')
        c.rowDim = c.rowDim.setLabels(c.data{rowTimesIndex});
    end
    
    c.varDim = c.varDim.deleteFrom(rowTimesIndex);
    c.data(rowTimesIndex) = []; 
    
    % Set the row times name of the joined table to the time label of A
    c.metaDim = c.metaDim.setLabels(a.metaDim.labels);
end

end