summaryrefslogtreecommitdiff
path: root/40/CH8/EX8.16/Exa_8_16.sce
blob: e26b99b6f50aa1855c7ec826858e62b9e9e19250 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
//signal interpolation using FFT
xn=[0 1 0 -1];
XDFT=fft(xn,-1)
ZT=[0 -2*%i 0 zeros(1:27) 0 2*%i];
xn1=fft(ZT,1);
t=0:1/length(xn1):1-(1/length(xn1));
a=gca();
a.x_location="origin";
plot2d(t,xn1);
xlabel('time t');
ylabel('Amplitude');
xtitle('Interpolated Sinusoid:4 samples over one period');