📄 ex10_14.m
字号:
%EX10_14.M Compute the convolution of
% h(n)=(0.9)^n and u(n) so y(n)=h(n)*u(n)
%
clear
N=9; % N+1 terma
n=0:N;
u=ones(1,length(n)); % Input
for I=1:N+1
h(I)=(0.9)^(I-1); % Impulse response
y1(I)=10*(1-(0.9)^(I)); % Response y
end
y=conv(u,h) % Lenght is 2N-1
% Comparison
error=y(1:N+1)-y1
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -