Rusty
Posts:
108
Registered:
6/16/05


Re: derivative of discrete fourier transform interpolation
Posted:
Sep 30, 2005 11:47 AM


I had a further look at this and what you are trying to do is only possible if the middle Fourier coefficient, X(N/2) is zero. This first bit of MatLab does the problem by your method and has a nonzero imaginary part in the interpolated function for noninteger s values.
N=16
x=(1:N)'
X=fft(x)
s=0.25
ix=0;
for k=1:N/2+1
ix=ix+X(k)*exp(2*pi*1i*(k1)*s/N);
end
for k=1:N/21
ix=ix+X(N+1k)*exp(2*pi*1i*k*s/N);
end
ix=ix/N
This modified code, with one line changed to ignores X(8) gets a pure real interpolated value, but it is not consistent with the original function x(s), even at integer s values.
ix=0;
for k=1:N/2 %%%%%%%%% different upper limit
ix=ix+X(k)*exp(2*pi*1i*(k1)*s/N);
end
for k=1:N/21
ix=ix+X(N+1k)*exp(2*pi*1i*k*s/N);
end
ix=ix/N
conclusion your method will only work for functions x(s) such that X(N/2) = 0, ie x(0)  x(1) + x(2)  x(3) + x(4).......... x(N1) = 0
rusty

