rfft1f
Return to Main Contents
NAME
RFFT1F - real backward fast Fourier transform
SYNOPSIS
SUBROUTINE RFFT1F (N, INC, R, LENR, WSAVE, LENSAV, WORK, LENWRK, IER)
INTEGER N, INC, LENR, LENSAV, LENWRK, IER
REAL R(LENR), WSAVE(LENSAV), WORK(LENWRK)
DESCRIPTION
FFTPACK 5.0 routine RFFT1F computes the one-dimensional Fourier
transform of a periodic sequence within a real array. This
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 RFFT1F followed
by a call to RFFT1B (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 R,
of two consecutive elements within the sequence.
R Real array of length LENR containing the sequence to be
transformed.
LENR Integer dimension of R array. LENR must be at least
INC*(N-1) + 1.
WSAVE Real work array of length LENSAV. WSAVE's contents must
be initialized with a call to subroutine RFFT1I before the
first call to routine RFFT1F or RFFT1B for a given transform
length N.
LENSAV Integer dimension of WSAVE array. LENSAV must be at least
N + INT(LOG (REAL(N))) +4.
WORK Real work array of dimension LENWRK.
LENWRK Integer dimension of WORK array. LENWRK must be at N.
Output Arguments
R Real output array R. For purposes of exposition,
assume R's range of indices is given by
R(0:(N-1)*INC).
Then
N-1
R(0) = SUM R(N1*INC)/N
N1=0
If N is even, set NH=N/2-1; if N is odd set NH=(N-1)/2;
then for J=1,...,NH
R((2*J-1)*INC) =
N-1
2.*SUM (R(N1*INC)*COS(J*N1*2*PI/N)/N
N1=0
and
R(2*J*INC) =
N-1
2.*SUM (R(N1*INC)*SIN(J*N1*2*PI/N)/N
N1=0
Also if N is even then
R((N-1)*INC) =
N-1
SUM (-1)**N1*R(N1*INC)/N
N1=0
IER Integer error return
= 0 successful exit
= 1 input parameter LENR not big enough
= 2 input parameter LENSAV not big enough
= 3 input parameter LENWRK not big enough