令狐文艳创作grid on;
title('Bode Diagram');
xlabel('Frequency(rad/sec)'); ylabel('Gain dB');
subplot(212);
semilogx(w,pha);
grid on;
xlabel('Frequency(rad/sec)'); ylabel('phase deg')
G2(s)
num=2.7;
den=[1,5,-4,0];
w=logspace(-1,2,47);
[mag,pha]=bode(num,den,w); magdB=20*log10(mag);
subplot(211);
semilogx(w,magdB);
grid on;
title('Bode Diagram');
令狐文艳创作
