2.3.6 COSQI/COSQF/COSQB

1.
Function
Performs cosine transformation only on even wavenumber components: COSQI initializes; COSQF performs forward cosine transformation; and COSQB performs inverse cosine transformation.
2.
Definition
Forward transformation is defined as follows:


Inverse transformation is defined as follows:


\begin{displaymath}X_{i} = 4 \sum_{k=1}^{N}r_{k} \cos \frac{\pi (2k-1)(i-1)}{2N}\mbox{\hspace{1em}}( i = 1, \ldots, N ). \end{displaymath}

3.
Call
CALL COSQI(N,WSAVE)
CALL COSQF(N,R,WSAVE)
CALL COSQB(N,R,WSAVE)
4.
Explanation of Parameters
N (I) Length of data to process.
WSAVE (R) Working array. Must have length of at least 3N+15.
R (R) Floating-point array to process. It is both the input and output parameter. (See above definition.)
5.
Notes
(a)
This transformation does not involve normalization. In other words, when COSQF and COSQB are called successively, then the value of the original value multiplied by 4N is returned.