function D = addBlocks(D,BlockList)
% Adds a list of blocks to LFT model according to
%    M = lft([M 0;0 0],blkdiag(B1,...,BN)).
% This function is useful to enforce the same set of blocks
% in a model array.

%   Copyright 1986-2012 The MathWorks, Inc.
for ct=1:numel(BlockList)
   BlockList{ct} = ltipack.LFTBlockWrapper(BlockList{ct});
end
B = cat(1,BlockList{:});
[ny,nu] = iosize(B);
D.IC = append(D.IC,createGain(D.IC,zeros(nu,ny)));
D.Blocks = [D.Blocks ; B];
