cfft1f
Return to Main Contents
NAME
CFFT1F - complex forward fast Fourier transform
SYNOPSIS
SUBROUTINE CFFT1F (N, INC, C, LENC, WSAVE, LENSAV,
1 WORK, LENWRK, IER)
INTEGER N, INC, LENC, LENSAV, LENWRK, IER
COMPLEX C(LENC)
REAL WSAVE(LENSAV), WORK(LENWRK)
DESCRIPTION
FFTPACK 5.0 routine CFFT1F computes the one-dimensional Fourier
transform of a single periodic sequence within a complex array.
This transform is referred to as the forward transform or Fourier
analysis, transforming the sequence from physical to spectral
space.
This transform is normalized since a call to CFFT1F followed
by a call to CFFT1B (or vice-versa) reproduces the original
array within roundoff error.
Input Arguments
N Integer length of the sequence to be transformed. The
transform is most efficient when N is a product of
small primes.
INC Integer increment between the locations, in array C, of two
consecutive elements within the sequence to be transformed.
C Complex array of length LENC containing the sequence to be
transformed.
LENC Integer dimension of C array. LENC must be at least
INC*(N-1) + 1.
WSAVE Real work array with dimension LENSAV. WSAVE's contents
must be initialized with a call to subroutine CFFT1I before
the first call to routine CFFT1F or CFFT1B for a given
transform length N. WSAVE's contents may be re-used for
subsequent calls to CFFT1F and CFFT1B with the same N.
LENSAV Integer dimension of WSAVE array. LENSAV must be at least
2*N + INT(LOG(REAL(N))) + 4.
WORK Real work array of dimension LENWRK.
LENWRK Integer dimension of WORK array. LENWRK must be at
least 2*N.
Output Arguments
C For index J*INC+1 where J=0,...,N-1 (that is, for the Jth
element of the sequence),
C(J*INC+1) =
N-1
SUM C(K*INC+1)*EXP(-I*J*K*2*PI/N)
K=0
where I=SQRT(-1).
At other indices, the output value of C does not differ
from input.
IER = 0 successful exit
= 1 input parameter LENC not big enough
= 2 input parameter LENSAV not big enough
= 3 input parameter LENWRK not big enough
= 20 input error returned by lower level routine