📄 example6_1_1.m
字号:
%==========================================================================
% Name:example6_1_1.m
%
%==========================================================================
clear;close all,
w1=2*pi*50;
w2=2*pi*150;
w3=2*pi*300;
num1=[1 -2*0.066*w1 w1^2];
den1=[1 2*0.066*w1 w1^2];
num2=[1 -2*0.033*w2 w2^2];
den2=[1 2*0.033*w2 w2^2];
num3=[1 -2*0.058*w3 w3^2];
den3=[1 2*0.058*w3 w3^2];
num=conv(num1,num2);
num=conv(num,num3);
den=conv(den1,den2);
den=conv(den,den3);
t=0:0.0001:0.2;w=0:0.1:2*pi*400;
h1=impulse(num1,den1,t);
[H1,w]=freqs(num1,den1,w);
phi1=angle(H1);
h2=impulse(num2,den2,t);
[H2,w]=freqs(num2,den2,w);
phi2=angle(H2);
h3=impulse(num3,den3,t);
[H3,w]=freqs(num3,den3,w);
phi3=angle(H3);
h=impulse(num,den,t);
[H,w]=freqs(num,den,w);
phi=angle(H);
subplot(421)
plot(w/(2*pi),phi1),grid on, title('The phase function')
subplot(422)
plot(t,h1),grid on, title('The impulse response')
subplot(423)
plot(w/(2*pi),phi2),grid on,
subplot(424)
plot(t,h2),grid on,
subplot(425)
plot(w/(2*pi),phi3),grid on,
subplot(426)
plot(t,h3),grid on,
subplot(427)
plot(w/(2*pi),phi),grid on, xlabel('Frequency in Hz')
subplot(428)
plot(t,h),grid on, xlabel('Time sec')
axis([0,0.2,-600,600])
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -