Computes parameters needed by FFTCF and FFTCB.
N — Length of the sequence to be transformed. (Input)
WFFTC — Array of length 4N + 15 containing parameters needed by FFTCF and FFTCB. (Output)
Generic: CALL FFTCI (N, WFFTC)
Specific: The specific interface names are S_FFTCI and D_FFTCI.
Double: The double precision name is DFFTCI.
The routine FFTCI initializes the routines FFTCF and FFTCB. An efficient way to make multiple calls for the same N to IMSL routine FFTCF or FFTCB is to use routine FFTCI for initialization. (In this case, replace FFTCF or FFTCB with F2TCF or F2TCB, respectively.) The routine FFTCI is based on the routine CFFTI in FFTPACK. The package FFTPACK was developed by Paul Swarztrauber at the National Center for Atmospheric Research.
Different WFFTC arrays are needed for different values of N.
In this example, we compute a two-dimensional complex FFT by making one call to FFTCI followed by 2N calls to F2TCF.
! SPECIFICATIONS FOR PARAMETERS
REAL FLOAT, TWOPI, WFFTC(35), CPY(2*N)
COMPLEX CEXP, CMPLX, COEF(N,N), H, SEQ(N,N), TEMP
! Here we compute e**(2*pi*i/N)
TEMP = CMPLX(0.0,TWOPI/FLOAT(N))
SEQ(I,J) = H**((I-1)*(IR-1)+(J-1)*(IS-1))
WRITE (NOUT,99998) (SEQ(I,J),J=1,N)
! Transform the columns of SEQ
CALL F2TCF (N, SEQ(1:,I), COEF(1:,I), WFFTC, CPY)
! Take transpose of the result
! Transform the columns of this result
CALL F2TCF (N, COEF(1:,I), SEQ(1:,I), WFFTC, CPY)
! Take transpose of the result
WRITE (NOUT,99998) (SEQ(I,J),J=1,N)
99997 FORMAT (1X, 'The input matrix is below')
99998 FORMAT (1X, 4(' (',F5.2,',',F5.2,')'))
99999 FORMAT (/, 1X, 'Result of two-dimensional transform')
The input matrix is below
( 1.00, 0.00) ( 1.00, 0.00)
( 1.00, 0.00) ( 1.00, 0.00)
(-1.00, 0.00) (-1.00, 0.00) (-1.00, 0.00)
(-1.00, 0.00)
( 1.00, 0.00) ( 1.00, 0.00) ( 1.00, 0.00) ( 1.00,
0.00)
(-1.00, 0.00) (-1.00, 0.00) (-1.00, 0.00) (-1.00,
0.00)
Result of two-dimensional transform
( 0.00, 0.00) ( 0.00,
0.00) ( 0.00, 0.00) ( 0.00, 0.00)
( 0.00, 0.00) ( 0.00, 0.00) ( 0.00,
0.00) ( 0.00, 0.00)
(16.00, 0.00) ( 0.00, 0.00) ( 0.00, 0.00) ( 0.00,
0.00)
( 0.00, 0.00) ( 0.00, 0.00) ( 0.00, 0.00) ( 0.00, 0.00)
Visual Numerics, Inc. PHONE: 713.784.3131 FAX:713.781.9260 |