%% MIMO Uncertain Dynamics
% Create a ultidyn object with internal name 'H', norm bounded by 7, with three inputs and two outputs.

H = ultidyn('H',[2 3],'Bound',7) 

%
% Typically, when you use uncertain dynamics, you apply a weighting function to emphasize the uncertain contribtion in a certain bandwidth. For instance, suppose that the behavior of your system is modestly uncertain (say 10%) at low frequencies, while the high-frequency behavior beyond 20 rad/s is not accurately modeled. Use makeweight to create a shaping filter that captures this behavior.

W = makeweight(.1,20,50);
bodemag(W)

%
% Apply the weighting filter at the block outputs. Examine samples of the unmodeled dynamics.

Hw = blkdiag(W,W)*H;
bodemag(Hw)

%
% Copyright 2019 The MathWorks, Inc.