?? iir_realization_integral.m
字號:
clear,close all;
n=0:200;
x=u(n)-u(n-50);%+1*cos(.4*pi*n).*(u(n-50)-u(n-100)).*exp(-0.2*(n-50));
%x=exp(-0.1*(n));
x=2*cos(.01*pi*n).*exp(-0.05*(n));
num=[1 -1.6097 0.6423];
den=[1 0 -1];
[H,w]=freqz(num,den);
h=impz(num,den,n);
subplot(212)
%plot(w/pi,abs(H))
y1=filter(num,den,70*x);
y2=zeros(1,201);
for i=1:200;
y2(i)=y1(i)+y1(i+1);
end
stem(n,50+y2,'.')
axis([0,200,-50,150])
subplot(211)
%plot(w1,abs(H1))
stem(n,x,'r.')
%axis([0,200,-50,150])
%subplot(223)
%y1=filter(num,den,x);
%stem(n,y1,'.')
%axis([0,50,0,1.2])
%subplot(224)
%x=u(n);
%y=zeros(1,201);
%wn_1=0;wn_2=0;
%for i=1:201;
% wn=x(i)+0.3092*wn_1+0.7108*wn_2;
% y(i)=7.0924*wn-11.8072*wn_1+5.0763*wn_2;
% wn_2=wn_1;
%wn_1=wn;
%stem(n,y,'r.'),hold on;
%axis([0,50,-2,2])
%pause
%end
%stem(n,x)
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -