?? ex032200.m
字號(hào):
% 第三章: 例 3.22
%
%
figure(1); clf
% a)離散時(shí)間信號(hào) x1(n): Ts = 0.0002
Ts = 0.0002; n = -25:1:25; nTs = n*Ts;
x = exp(-1000*abs(nTs));
%
Dt = 0.00005;
t = -0.005:Dt:0.005;
xa = spline(nTs,x,t);
% check
error = max(abs(xa - exp(-1000*abs(t))))
% Plots
subplot(2,1,1);plot(t*1000,xa);
a=axis;text(a(2)+.2,a(3),'t 毫秒'); ylabel('xa(t)')
title('利用三次插值函數(shù)由x1(n)重構(gòu)信號(hào)'); hold on
stem(n*Ts*1000,x); hold off
%
% 離散時(shí)間信號(hào)x2(n): Ts = 0.001
Ts = 0.001; n = -5:1:5; nTs = n*Ts;
x = exp(-1000*abs(nTs));
%模擬信號(hào)重構(gòu)
Dt = 0.00005;
t = -0.005:Dt:0.005;
xa = spline(nTs,x,t);
% check
error = max(abs(xa - exp(-1000*abs(t))))
% Plots
subplot(2,1,2);plot(t*1000,xa);
xlabel('t 毫秒'); ylabel('xa(t)')
title('利用三次插值函數(shù)由x2(n)重構(gòu)信號(hào)'); hold on
stem(n*Ts*1000,x); hold off
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -