matlab3作业

合集下载
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

1.1 b=2; a=[1 0]; sys=tf('s'); sys=tf(b,a); z=roots(b); p=roots(a); subplot(1,2,1); pzmap(p,z); xlabel('t'); title('零极点图'); t=0:0.1:3; y=impulse(b,a,t); subplot(1,2,2);
plot(t,y);xlabel('t');title('冲激响应h(t)')
-1
-0.5
00.5
1
-1-0.8-0.6-0.4-0.200.20.40.6
0.8
1
零极点图
t
I m a g i n a r y A x i s
01
23
1
1.2
1.41.61.82
2.22.4
2.6
2.8
3t
冲激响应h(t)
b=2;
a=conv([1 7j],[1 -7j]); sys=tf('s'); sys=tf(b,a); z=roots(b); p=roots(a); subplot(1,2,1); pzmap(p,z); xlabel('t'); title('零极点图'); t=0:0.1:3; y=impulse(b,a,t); subplot(1,2,2);
plot(t,y);xlabel('t');title('冲激响应h(t)')
-1
-0.500.51
-8-6
-4
-2
24
6
8
零极点图
t
I m a g i n a r y A x i s
01
23
-0.4
-0.3
-0.2
-0.1
0.1
0.2
0.3
t
冲激响应h(t)
b=2;
a=conv([1 0.5+12j],[1 0.5-12j]); sys=tf('s'); sys=tf(b,a); z=roots(b); p=roots(a); subplot(2,2,1); pzmap(p,z); xlabel('t'); title('零极点图'); [h,w]=freqs(b,a); subplot(2,2,3);
plot(w,abs(h));xlabel('w ');title('幅频特性 '); subplot(2,2,4);
plot(w,angle(h));xlabel('w ');title('相频特性 '); t=0:0.1:3; y=impulse(b,a,t); subplot(2,2,2);
plot(t,y);xlabel('t');title('冲激响应h(t)')
-0.8
-0.6-0.4-0.20
-20-10010
20
零极点图
t
I m a g i n a r y A x i s
50100
00.050.10.15
0.2w
幅频特性
50100
-4-3-2-1
0w
相频特性
0123
-0.2
-0.100.1
0.2t
冲激响应h(t)
b=[2,-2];
a=conv([1 3+9j],[1 3-9j]); sys=tf('s'); sys=tf(b,a); z=roots(b); p=roots(a); subplot(2,2,1); pzmap(p,z); xlabel('t'); title('零极点图'); [h,w]=freqs(b,a); subplot(2,2,3);
plot(w,abs(h));xlabel('w ');title('幅频特性 '); subplot(2,2,4);
plot(w,angle(h));xlabel('w ');title('相频特性 '); t=0:0.1:3; y=impulse(b,a,t); subplot(2,2,2);
plot(t,y);xlabel('t');title('冲激响应h(t)')
50100
00.10.20.3
0.4w
幅频特性
50100
-2
02
4w
相频特性
0123
-1
1
2
t
冲激响应h(t)
零极点图
t
I m a g i n a r y A x i s
1.5 b=[2,-12];
a=conv([1 -3+20j],[1 -3-20j]); sys=tf('s'); sys=tf(b,a); z=roots(b); p=roots(a); subplot(1,2,1); pzmap(p,z); xlabel('t'); title('零极点图'); t=0:0.1:3; y=impulse(b,a,t); subplot(1,2,2);
plot(t,y);xlabel('t');title('冲激响应h(t)')
零极点图
t
I m a g i n a r y A x i s
01
23
-1.5
-1
-0.5
0.5
1
4
t
冲激响应h(t)
02
46
2.1高通滤波器 b= [0 0 1];
a=conv([1 85+157j],[1 85-157j]); sys=tf('s'); sys=tf(b,a) p=roots(a); z=roots(b); figure(1)
subplot(1,2,1); %零极点图 pzmap(p,z); xlabel('t');title('零极点图'); subplot(1,2,2); %对应的冲激响应h(t) plot(h); xlabel('t');title('冲激响应h(t)'); [H,w]=freqs(b,a); figure(2) %频谱图
plot(w,abs(H));xlabel('w');title('频谱图');
零极点图
t
I m a g i n a r y A x i s
010
203040
-1
1
2
3
4
5
t
冲激响应h(t)
-100
-500
-200-150
-100
-50
50
100
150
200
0100200300400
5006007008009001000
0.2
0.4
0.6
0.8
1
1.2
1.4
w
频谱图
2.2低通滤波器 b=70* [0 0 1]; a=[1 8 70]; sys=tf('s'); sys=tf(b,a) p=roots(a); z=roots(b);
pzmap(p,z); xlabel('t');title('零极点图'); subplot(1,2,2); %对应的冲激响应h(t) plot(h); xlabel('t');title('冲激响应h(t)'); [H,w]=freqs(b,a); figure(2) %频谱图
plot(w,abs(H));xlabel('w');title('频谱图'); grid on
-4
-3-2-10
零极点图
t
I m a g i n a r y A x i s
10
203040
-1
1
2
3
4
5
t
冲激响应h(t)
010203040
5060708090100
0.2
0.4
0.6
0.8
1
1.2
1.4
w
频谱图。

相关文档
最新文档