blob: 4bd0eb54ea7d647e00e1703743a160b2b2729abe (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
//signal interpolation using FFT
xn=[0 1 0 -1];
XDFT=dft(xn,-1)
ZT=[0 -2*%i 0 zeros(1:27) 0 2*%i];
xn1=dft(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');
|