%  Example 5.12.  Robust stability evaluation using the structured
%    singular value.
clear
%  Define the state model for the transfer function Mydwd.
A=[  0   1   0
     0 -350  1
   -3e6  0  -55];
B=[0 0 0
   0 0 1
   1 1 0];
C=[-3e5 0  0
     0  0  5
     0 50 0];
D=zeros(3);
%  Generate the frequency response for this system.
w=logspace(0,3);
M11=pck(A,B,C,D);
fr=frsp(M11,w);
%  Compute the structured singular value from the frequency response.
%    Define the block structure.
blk=ones(3,2);
%    Compute the SSV.
muM=mu(fr,blk);
%  Plot the results.
set(0,'DefaultAxesFontName','times')
set(0,'DefaultAxesFontSize',16)
set(0,'DefaultTextFontName','times')
figure(1)
clf
vplot('liv,lm',muM)
xlabel('Frequency (rad/sec)')
ylabel('Magnitude')
grid
%  Compute the maximum of the SSV.
maxmu=max(muM(:,1))
