XLPack 7.0
XLPack Numerical Library (Excel VBA) Reference Manual
Loading...
Searching...
No Matches

◆ Cfft2b()

Sub Cfft2b ( L As  Long,
M As  Long,
C() As  Complex,
Wsave() As  Double,
Info As  Long 
)

Two-dimensional complex Fourier backward transform

Purpose
This routine computes the two-dimensional Fourier transform of a periodic sequence within a real array. This is referred to as the backward transform or Fourier synthesis, transforming the sequence from spectral to physical space.
C(j,k) = ΣΣC(l1,m1)exp(2πi(j*l1/L+k*m1/M)) (1st Σ for l1 = 0 to L-1, 2nd Σ for m1 = 0 to M-1) (j = 0 to L-1, k = 0 to M-1) (i is imaginary unit)
This transform is normalized since a call to Cfft2b followed by a call to Cfft2f (or vice-versa) reproduces the original array subject to algorithmic constraints, roundoff error, etc.
Parameters
[in]LNumber of elements to be transformed in the first dimension of the two-dimensional array C(). (L >= 1) (The transform is most efficient when L is a product of small primes)
[in]MNumber of elements to be transformed in the second dimension of the two-dimensional array C(). (M >= 1) (The transform is most efficient when M is a product of small primes)
[in,out]C()Array C(LC1 - 1, LC2 - 1) (LC1 >= L, LC2 >= M)
[in] The two dimensional sequence dat to be transformed.
[out] Fourier backward transformed two dimensional sequence data.
[in]Wsave()Array Wsave(LWsave - 1) (LWsave >= 2*(L+M) + ln(L)/ln(2) + Ln(M)/Ln(2) + 8)
Work data. Its contents must be initialized with a call to Cfft2i before the first call to Cfft2f or Cfft2b for a given transform length L and M.
[out]Info= 0: Successful exit.
= -1: The argument L had an illegal value. (L < 1)
= -2: The argument M had an illegal value. (M < 1)
= -3: The argument C() is invalid. (Array C() is not big enough)
= -4: The argument Wsave() is invalid. (Array Wsave() is not big enough)
Reference
FFTPACK
Example Program
See example of Cfft2f.