How to define the frequency in spectrum obtained by fftw?

  • Follow


Hi all,
  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
frequency  k/T
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 !!!
0
Reply rex_chaos 10/7/2003 9:19:32 AM


0 Replies
346 Views

(page loaded in 0.021 seconds)

Similiar Articles:













7/22/2012 2:13:04 AM


Reply: