COMPGROUPS.NET | Search | Post Question | Groups | Stream | About | Register

### How to define the frequency in spectrum obtained by fftw?

• Email
• 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

See related articles to this posting

0 Replies
514 Views

Similar Articles

12/6/2013 11:26:32 PM
[PageSpeed]