next up previous contents index
Next: Fourier transforms Up: Fourier transforms Previous: Fourier transforms   Contents   Index


FFTs in funct

We will first define what we mean by the FFT of a function $f(x)$ on $N$ points. Suppose that the function is defined on the interval $[0,L]$. Then we take the $N$ values $f(i\frac{L}{N-1})$, $0\leq i<N$, and make the usual FFT transform of them, which give

\begin{displaymath}z_m \ = \ T_Nf(\frac{2m\pi}{L})\end{displaymath}

for $0\leq m\leq N/2$. We can easily deduce the value of $T_Nf(\frac{2m\pi}{L})$for $N/2\leq m\leq N$ :

\begin{displaymath}T_Nf(\frac{2m\pi}{L}) = \overline{z_{N-m}}.\end{displaymath}

We obtain then $T_Nf(\frac{2m\pi}{L})$ for any integer $m$ by periodicity.

Now what we call FFT transform of $f$ here is the continuous function which is the same as $T_Nf$ at the points $x_m=\frac{2m\pi}{L}$, and which is linear between $x_m$ and $x_{m+1}$.

The command to compute FFTs is the following :

 - funct -> fft f1 f2 N

Here f1 is a real or complex function, f2 a complex function with the same precision as f1. This command computes the FFT of f1 on N points and puts the result in f2 (N must be a power of 2).As for the other commands of funct involving functions, f1 and f2 can have any x-ranges.


next up previous contents index
Next: Fourier transforms Up: Fourier transforms Previous: Fourier transforms   Contents   Index
2009-11-12