www.gusucode.com > control 案例程序 matlab源码代码 > control/PeakGainwithSpecifiedAccuracyExample.m

    %% Peak Gain with Specified Accuracy  
% Compute the peak gain of the resonance in the transfer function with a
% relative accuracy of 0.01%.
%%
% 
% $$sys = {{90} \over {{s^2} + 1.5s + 90}}.$$
% 

%%  
sys = tf(90,[1,1.5,90]);
gpeak = getPeakGain(sys,0.0001) 

%%
% The second argument specifies a relative accuracy of 0.0001. The |getPeakGain|
% command returns a value that is within 0.0001 (0.01%) of the true peak gain of
% the transfer function. By default, the relative accuracy is 0.01 (1%).