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

📄 dfilter.m

📁 经典《信号与系统》教程的matlab例程,对深入理解信号与系统相关概念有很大帮助
💻 M
字号:
% dfilter
h=input('Type in the right-sided coefficient vector:');
a=1;%input('Type in the left-sided coefficient vector:');
L=length(h);

n=0:79;
b=zeros(1,80);
for i=1:L
    b(i)=h(i);
end
h=b;
zi=zeros(1,length(h)-1);
x=input('Type in the input sequence x(n)=');
y=filter(h,a,x,zi);
subplot(311)
stem(n,h,'.');
title('The impulse response h(n)')
subplot(312)
stem(n,x,'r.')
ylabel('The input sequence x(n)')
subplot(313)
stem(n,y,'r.')
ylabel('y(n)')
%axis([0 80 -1.2 4]);
xlabel('Index n')

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -