rffti(3P)
NAME
rffti - initialize the array xWSAVE, which is used in both xFFTF and xFFTB.
SYNOPSIS
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 (long int n, float ∗wsave)
void dffti (long int n, double ∗wsave)
void cffti (long int n, complex ∗wsave)
void zffti (long int n, doublecomplex ∗wsave)
void vrffti (long int n, float ∗wsave)
void vdffti (long int n, double ∗wsave)
ARGUMENTS
NLength of the sequence to be transformed. N >= 0.
xWSAVEOn 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
Sun, Inc. — Last change: 20 Sep 1996