📄 dfilter.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 + -