extra.asv
来自「该程序用于讨论各种离散时间信号和系统的性质及特性。」· ASV 代码 · 共 24 行
ASV
24 行
% 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 + =
减小字号Ctrl + -
显示快捷键?