Computes a sequence from its sine Fourier coefficients with only odd wave numbers.
N — Length of the sequence to be transformed. (Input)
COEF — Array of length N containing the Fourier coefficients. (Input)
SEQ — Array of length N containing the sequence. (Output)
Generic: CALL QSINB (N, COEF, SEQ)
Specific: The specific interface names are S_QSINB and D_QSINB.
Single: CALL QSINB (N, COEF, SEQ)
Double: The double precision name is DQSINB.
The routine QSINB computes the discrete (unnormalized) inverse Fourier quarter sine transform of a real vector of size N. The method used is a variant of the Cooley-Tukey algorithm, which is most efficient when N is a product of small prime factors. If N satisfies this condition, then the computational effort is proportional to N log N.
Specifically, given an N-vector c = COEF, QSINB returns in s = SEQ
Furthermore, a vector x of length N that is first transformed by QSINF and then by QSINB will be returned by QSINB as 4Nx. The routine QSINB is based on the inverse quarter sine FFT in FFTPACK which was developed by Paul Swarztrauber at the National Center for Atmospheric Research.
1. Workspace may be explicitly provided, if desired, by use of Q2INB/DQ2INB. The reference is:
CALL Q2INB (N, SEQ, COEF, WQSIN)
WQSIN — ray of length 3 * N + 15 initialized by QSINI. The initialization depends on N.(Input)
2. The routine QSINB is most efficient when N is the product of small primes.
3. The arrays COEF and SEQ may be the same.
4. If QSINF/QSINB is used repeatedly with the same value of N, then call QSINI followed by repeated calls to Q2INF/Q2INB. This is more efficient than repeated calls to QSINF/QSINB.
In this example, we first compute the quarter wave sine Fourier transform c of the vector x where xn = n for n = 1 to N. We then compute the inverse quarter wave Fourier transform of c which is 4Nx = s.
REAL FLOAT, SEQ(N), COEF(N), X(N)
! Compute the forward transform of X
! Compute the backward transform of W
WRITE (NOUT,99999) (X(I), COEF(I), SEQ(I), I=1,N)
99998 FORMAT (5X, 'INPUT', 5X, 'FORWARD TRANSFORM', 3X, 'BACKWARD ', &
99999 FORMAT (3X, F6.2, 10X, F6.2, 15X, F6.2)
INPUT FORWARD TRANSFORM
BACKWARD
TRANSFORM
1.00
39.88
28.00
2.00
-4.58
56.00
3.00
1.77
84.00
4.00
-1.00
112.00
5.00
0.70
140.00
6.00
-0.56
168.00
7.00
0.51
196.00
Visual Numerics, Inc. PHONE: 713.784.3131 FAX:713.781.9260 |