Fast discrete Fourier Transform (FFT).

Namespace: dsp::fourier

Prototype

auto fft(const Vector<T> &x)

Parameters

xInput vector (time domain).

Returns

X = DFT(x)

Description

This function will compute the normalized DFT of a real or complex vector: \[ X_n = \frac{1}{\sqrt{N}}\cdot\sum_{k=0}^{N-1} x_k \cdot e^{\frac{-2\pi\mathbf{i}kn}{N}} \]

Example

Vecf  x = randn(100);
Veccf X = fft(x);

See also

rfft(), ifft()