📄 extra.asv
字号:
% Program P2_4 modified
% Generate the input sequences
clf;
n = 0:40; D = 10;a = 3.0;b = -2;
x = a*cos(2*pi*0.1*n) + b*cos(2*pi*0.4*n);
x1 = a*cos(2*pi*0.1*(n-1)) + b*cos(2*pi*0.4*(n-1));
ic = [0 0]; % Set initial 0conditions
% Compute the output y[n]
y = n .* x + x1;
x2 = [zeros(1,D) x];
x3 = [zeros(1,D) x1];
m = 0:(40+D);
yd = m .* x2 + x3;
d = y - yd(1+D:41+D);
% Plot the outputs
subplot(2,1,1);
stem(n,y);
ylabel('Amplitude');
title('Output y[n]'); grid;
subplot(2,1,2);
stem(n,yd(1:41));
ylabel('Amplitude');
title('Output yt[n]'); grid;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -