Two transforms are implemented in the program funct : the Fourier
transform (with its variant the FFT transform)
and the Bessel transform. The second is computed from the
first, so
here the Bessel transform of a function
is rather a transform of its Fourier transform.
In funct it is possible to compute Fourier transforms
and
FFTs of functions.
We will first define what we mean by the FFT of a function on
points. Suppose that the function is defined on the interval
. Then
we take the
values
,
, and make the usual
FFT transform of them, which give
Now what we call FFT transform of here
is the continuous function
which is the same as
at the points
, and which is
linear between
and
.
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.
By Fourier transform of a function we
mean the function
defined in 2.2.
This is not the same as a single FFT,
and the computation requires several FFTs, as explained in
2.2. To define the Fourier
transform of a function (real or complex), the
command def_four is used (cf 3.4).
For example, if f1 is a real function, the instruction
computes the parameters associated to the Fourier transform of the function f1, which are stored in the object tr. The FFT's are made on 1024 points. Given a complex function C the instruction
will then compute the Fourier transform of f1 at the points of the x-range of C and put the result in C. It is of course possible to use several times the object tr (for other C).
See 3.4 for more details on
these commands.
To compute Bessel transforms of a real function we
need first its
Fourier transform :
def_four tr f 1024
for example. We define also a new kind of object which contains
some parameters to compute the last two formulas of 4.2.1 (i.e. some
values of the and
or
). This is
done with the instruction
Here xx is the name of the object that will contain the
parameters, n is the number of the Bessel transform and
n2 the number of
points in the interval used to compute the integrals.
The same object can be used to compute the n-th Bessel
tranform of
other functions. To
compute the Bessel transform of order n of
we
use the instruction
where g is a real function that will contain the result.