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

◆ WCost1b()

Function WCost1b ( N As  Long,
R As  Variant 
)

One-dimensional cosine backward transform

Purpose
WCost1b computes the one-dimensional Fourier transform of an even sequence within a real array. This is referred to as the backward transform or Fourier synthesis, transforming the sequence from spectral to physical space.
R(j) = sum(R(k)cos(pi*j*k/(N-1))) (sum for k=0 to N-1) (j=0 to N-1)
This transform is normalized since a call to WCost1b followed by a call to WCost1f (or vice-versa) reproduces the original array subject to algorithmic constraints, roundoff error, etc.
Returns
N x 1
Column 1
Rows 1 to NCosine backward transformed data sequence
Parameters
[in]NThe length of the sequence to be transformed. (N >= 1)
The transform is most efficient when N - 1 is a product of small primes.
[in]R(N) The sequence to be transformed.
Reference
FFTPACK
Example
See example of WCost1f.