I am using fftw as my fourier transform tools. I am going to take
numerical derivative with FFT. i.e.
D[u,t] = ifft(i*w*fft(u))
where w is the frequency and i is for the sqrt(-1).
According to "numerical recipe in C/C++", I got the angular frequency
is of the form
w = 2*pi*n/(N * dt ), n = -N/2, ... , N/2
where N is the length of the signal and dt is the sampling interval.
However, from the document of fftw, the k-th output corresponds to the
here T is the total sampling period.
According to the definition from fftw, I take
w = n/N
It is quite different from the definition in the previous one (dT and
2*pi has gone !!!). A testing program show that the result is correct
only when I take
D[u, t] = ifftw( i*w*fftw(u) ) and w=n/N;
It's really weird !!!
||10/7/2003 9:19:32 AM