function D1 = append(D1,D2)
% Appends inputs and outputs of two models.

%   Copyright 2020 The MathWorks, Inc.
if isfinite(D1) && isfinite(D2)
   D1 = append@ltipack.AbstractSS(D1,D2);
   D1.StateInfo = [D1.StateInfo;D2.StateInfo];
   D1.SolverConfig = ltioptions.sparss.reconcile(D1.SolverConfig,D2.SolverConfig);
else
   % One system is NaN
   D1 = createGain(D1,NaN(iosize(D1)+iosize(D2)));
end