Previous Next Contents Generated Index Doc Set Home



Initialize Fourier Transform and Synthesis

The subroutines described in this section initialize the array xWSAVE, which is used in both xFFTF and xFFTB.

Calling Sequence

CALL RFFTI 
(N, RWSAVE)
CALL DFFTI 
(N, DWSAVE)
CALL CFFTI 
(N, RWSAVE)
CALL ZFFTI 
(N, DWSAVE)
CALL VRFFTI 
(N, RWSAVE)
CALL VDFFTI 
(N, DWSAVE)
 



void rffti 
(int n, float *rwsave)
void dffti 
(int n, double *dwsave)
void cffti 
(int n, complex *rwsave)
void zffti 
(int n, doublecomplex *dwsave)
void vrffti 
(int n, float *rwsave)
void vdffti 
(int n, double *dwsave)

Arguments

N

Length of the sequence to be transformed. N 0.

xWSAVE

On entry, an array with a dimension for scalar subroutines of at least
(2 × N + 15) for real inputs or (4 × N + 15) for complex inputs. For vector subroutines, the dimension is at least (N + 15). The same work array can be used for both xFFTF and xFFTB as long as N remains unchanged. Different xWSAVE arrays are required for different values of N. This initialization does not have to be repeated between calls to xFFTF or xFFTB as long as N and xWSAVE remain unchanged, thus subsequent transforms can be obtained faster than the first.

Sample Program

 
      PROGRAM TEST
      IMPLICIT NONE
C
      INTEGER          N
      PARAMETER       (N = 9) 
C
      INTEGER          I
      REAL             PI, R(N), WSAVE(2 * N + 15)
C 
      EXTERNAL         RFFTB, RFFTF, RFFTI
      INTRINSIC        ACOS, SIN 
C
C     Initialize array to a real sequence.   
C
      PI = ACOS (-1.0)
      DO 100, I=1, N
        R(I) = 3.0 + SIN ((I - 1.0) * 2.0 * PI / N)
  100 CONTINUE
C
      PRINT 1000 
      PRINT 1010, (R(I), I = 1, N)
      CALL RFFTI (N, WSAVE)
      CALL RFFTF (N, R, WSAVE)
      PRINT 1020 
      PRINT 1010, (R(I), I = 1, N)
      CALL RFFTB (N, R, WSAVE)
      PRINT 1030 
      PRINT 1010, (R(I), I = 1, N)
C
 1000 FORMAT (1X, 'Original Sequence: ') 
 1010 FORMAT (1X, 100(F4.1, 1X))
 1020 FORMAT (1X, 'Transformed Sequence: ')
 1030 FORMAT (1X, 'Recovered Sequence: ')
C
      END
 

Sample Output

 
 Original Sequence: 
  3.0  3.6  4.0  3.9  3.3  2.7  2.1  2.0  2.4
 Transformed Sequence: 
 27.0  0.0 -4.5  0.0  0.0  0.0  0.0  0.0  0.0
 Recovered Sequence: 
 27.0 32.8 35.9 34.8 30.1 23.9 19.2 18.1 21.2






Previous Next Contents Generated Index Doc Set Home