XLPack 6.1
Excel Worksheet Function Numerical Library (Basic functions) Reference Manual
Loading...
Searching...
No Matches

◆ WRfft1f()

Function WRfft1f ( N As  Long,
R As  Variant 
)

One-dimensional real Fourier transforms

Purpose
WRfft1f computes the one-dimensional Fourier transform of a periodic sequence within a real array. This is referred to as the forward transform or Fourier analysis, transforming the sequence from physical to spectral space.
R(0) = (1/N) Σ(R(j)) (Σ for j = 0 to N-1)
R(2k-1) = (2/N) Σ(R(j)Cos(2*pi*j*k/N)) (Σ for j = 0 to N-1) (k = 1 to NH)
R(2k) = (2/N) Σ(R(j)Sin(2*pi*j*k/N)) (Σ for j = 0 to N-1) (k = 1 to NH)
R(N-1) = (1/N) Σ((-1)^j R(j)) (Σ for j = 0 to N-1) (only if N is even)
(If N is even, NH = N/2-1. If N is odd, NH = (N-1)/2)
This transform is normalized since a call to WRfft1f followed by a call to WRfft1b (or vice-versa) reproduces the original array subject to algorithmic constraints, roundoff error, etc.
Returns
N x 1
Column 1
Rows 1 to NFourier transformed data sequence
Parameters
[in]NThe length of the sequence to be transformed. (N >= 1)
The transform is most efficient when N is a product of small primes.
[in]R(N) The sequence to be transformed.
Reference
FFTPACK
Example
Compute the Fourier transform of the data sequence by WRfft1f. Then compute its backward transform by WRfft1b and confirm that the original data sequence is restored.

WRfft1f

WRfft1b