load freqresp.mat; % weighting function for robust stability s = tf('s'); wt1 = 2*pi*20; wt2 = 2*pi*2000; wt0 = 0.98; WT = wt0*(s+wt1)/wt1*wt2/(s+wt2); WT_g = frd(WT, w); % multiplicative uncertainty delta1_g = (P_g - P0_g)/P0_g; figure(4); clf; bodemag(WT_g, 'r-', delta1_g, 'b.'); legend('WT', 'multiplicative uncertainty', 'Location', 'NorthWest'); title(''); %axis([1, 2000, -50, 50]); print -depsc weight.eps; print -djpeg -r0 weight.jpg; print -dpng -r0 weight.png; save weight.mat WT;