IFFT

   more...
Computes the inverse of the Discrete Fourier Transform of one complex sequence.
Function Return Value
Complex array containing the inverse of the Discrete Fourier Transform of X. The result is the complex array of the same shape and rank as X. (Output)
Required Argument
X — Array containing the sequence for which the inverse transform is to be computed. X is an assumed shape complex array of rank 1, 2 or 3. If X is real or double, it is converted to complex internally prior to the computation. (Input)
Optional Arguments, Packaged Options
WORK — a COMPLEX array of the same precision as the data. For rank-1 transforms the size of WORK is n + 15. To define this array for each problem, set WORK(1) = 0. Each additional rank adds the dimension of the transform plus 15. Using the optional argument WORK increases the efficiency of the transform.
The option and derived type names are given in the following tables:
Option Name for IFFT
Option Value
options_for_fast_dft
1
Name of Unallocated Option Array to Use for Setting Options
Use
Derived Type
?_ifft_options(:)
Use when setting options for calls hereafter.
?_options
?_ifft_options_once(:)
Use when setting options for next call only.
?_options
For a description on how to use these options, see Matrix Optional Data Changes. See FAST_DFT located in Chapter 6, “Transforms” for the specific options for this routine.
FORTRAN 90 Interface
IFFT (X [])
Description
Computes the inverse of the Discrete Fourier Transform of a complex sequence. This function uses FAST_DFT, FAST_2DFT, and FAST_3DFT from Chapter 6.
Example (operator_ex37.f90)
 
use rand_gen_int
use fft_int
use ifft_int
use linear_operators
 
implicit none
 
! This is the equivalent of Example 4 for FAST_DFT (using operators).
 
integer j
integer, parameter :: n=40
real(kind(1e0)) :: err, one=1e0
real(kind(1e0)), dimension(n) :: a, b, c, yy(n,n)
complex(kind(1e0)), dimension(n) :: f, fa, fb
! Generate two random periodic sequences 'a' and 'b'.
a=rand(a); b=rand(b)
! Compute the convolution 'c' of 'a' and 'b'.
yy(1:,1)=b
do j=2,n
yy(2:,j)=yy(1:n-1,j-1)
yy(1,j)=yy(n,j-1)
end do
 
c=yy .x. a
 
! Compute f=inverse(transform(a)*transform(b)).
fa = fft(a)
fb = fft(b)
f=ifft(fa*fb)
! Check the Convolution Theorem:
! inverse(transform(a)*transform(b)) = convolution(a,b).
err = norm(c-f)/norm(c)
if (err <= sqrt(epsilon(one))) then
write (*,*) 'Example 4 for FAST_DFT (operators) is correct.'
end if
 
end