Usage: |
r = gFourierInversion(N,K,dt,t0,x0,charf,l)
|
Input: |
| N | scalar, the modulus of the Fast Fourier Transform (FFT)
used; should be a power of 2.
|
| K | scalar, the number of evaluations of the characteristic
function; K has to be smaller or equal to N; when K < N,
the input vector is filled with zeros up to N.
|
| dt | scalar, the grid-size in t used for the approximation of the
inversion integral
|
| t0 | scalar, indicating whether the t-grid includes t = 0 (t0==0)
or t = dt/2 (otherwise)
|
| x0 | scalar, the starting point of the x-grid
|
| charf | string, the name of the characteristic function
|
| l | list, containing l.mu (the expectation) and l.sigma
(the standard deviation) of the characteristic function (charf).
|
Output: |
| r | n x 1 vector containing the density values on the x-grid.
The grid is given by x_j = x_0 + j dx, dx = 2 pi/(N dt) |