5、 % 计算:Bode中的幅值和相位[ Gm,Pm,Wcg,Wcm] = margin(a0,b0); % 计算:稳定裕度disp ('System Gain Margin and its associated frequency are :');Gm % 模值稳定裕度Wcg % 幅值穿越频率,剪切频率,1/sdisp ('System Phase Margin and its
6、associated frequency are :');Pm % 相位稳定裕度Wcm % -π相位穿越频率,1/s%%%% 绘制:Bode图figure(3)Subplot (211); % 对数幅值-频率图amp = 20*log10(mag); % 20*log(mag),dBsemilogx(wt,amp);tit