|
|
◆ Costmb()
| Sub Costmb |
( |
Lot As |
Long, |
|
|
Jump As |
Long, |
|
|
N As |
Long, |
|
|
R() As |
Double, |
|
|
Wsave() As |
Double, |
|
|
Info As |
Long, |
|
|
Optional Inc As |
Long = 1 |
|
) |
| |
One-dimensional cosine backward transform (multiple sequences)
- Purpose
- This routine computes the one-dimensional Fourier transform of multiple even sequences within a real array. This is referred to as the backward transform or Fourier synthesis, transforming the sequence from spectral to physical space.
R(l*jump+j) = ΣR(l*jump+k)cos(πjk/(N-1)) (Σ for k = 0 to N-1) (l = 0 to lot-1, j = 0 to N-1)
This transform is normalized since a call to Costmb followed by a call to Costmf (or vice-versa) reproduces the original array subject to algorithmic constraints, roundoff error, etc.
- Parameters
-
| [in] | Lot | Number of sequences to be transformed. (Lot >= 1) |
| [in] | Jump | Increment between the locations, in array R(), of the first elements of two consecutive sequences to be transformed. (Jump >= 1) |
| [in] | N | Length of the sequence to be transformed. (N >= 1) (The transform is most efficient when N-1 is a product of small primes) |
| [in,out] | R() | Array R(LR - 1) (LR >= (Lot - 1)*Jump + Inc*(N - 1) + 1)
[in] The sequences to be transformed.
[out] The Fourier backward transformed sequences of data. |
| [in] | Wsave() | Array Wsave(LWsave - 1) (LWsave >= 2*N + ln(N)/ln(2) + 4)
Work data. Its contents must be initialized with a call to Costmi before the first call to Costmf or Costmb for a given transform length N. |
| [out] | Info | = 0: Successful exit.
= -1: The argument Lot had an illegal value. (Lot < 1, or, Lot, Jump, N and Inc are inconsistent)
= -2: The argument Jump had an illegal value. (Jump < 1)
= -3: The argument N had an illegal value. (N < 1)
= -4: The argument R() had an illegal value. (Array R() is not big enough)
= -5: The argument Wsave() had an illegal value. (Array Wsave() is not big enough)
= -7: The argument Inc had an illegal value. (Inc < 1) |
| [in] | Inc | (Optional)
Integer increment between the locations, in array R(), of two consecutive elements within the sequence. (Inc >= 1) (default = 1) |
- Reference
- FFTPACK
- Example Program
- See example of Costmf.
|