📄 exe0212_01.m
字号:
clear;
b1=[0.5];
a1=[1 -0.9];
b2=[0 1 -1];
a2=[1 -sqrt(2.) 1];
h1=impz(b1,a1,256);
h2=impz(b2,a2,256);
n=0:1:60;
x1=ones(256);
y1=filter(b1,a1,x1);
subplot(211);
plot(n,y1(1:61));
subplot(212);
stem(n,h1(1:61));
subplot(212);
stem(n,h2(1:61));
[H1,w1]=freqz(b1,a1,256,'whole',1);
[H2,w2]=freqz(b2,a2,256,'whole',1);
w=w1;
%zplane(b1,a1)
%zplane(b2,a2);
Hr1=abs(H1);
Hr2=abs(H2);
Hphase1=angle(H1);
Hphase2=angle(H2);
Hp1=unwrap(Hphase1);
Hp2=unwrap(Hphase2);
Hr=Hr1.*Hr2;
Hp=Hp1+Hp2;
subplot(121);
plot(w,Hr,'r');
subplot(122);
plot(w,Hp,'r');
%zplane(b,a);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -