?? 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 + -