⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 iir_realization_integral.m

📁 经典《信号与系统》教程的matlab例程,对深入理解信号与系统相关概念有很大帮助
💻 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 + -