Discrete Fourier Transform
1 — Size: Pick a sequence length \(L\) and DFT length \(M\).
2 — Input: Type any Python-style expression to define \(x[k]\), e.g., sin[2*pi*k/L] or 0.8**k * step[k].
3 — Sliders: Shift circularly (\(s\)), rescale (\(a\)), or stretch (\(w\)) the input signal, resulting in $$a\cdot x[\frac 1 w ((k-s)\mod L)].$$
4 — Compute: On clicking Compute, the page plots \(x[k]\) as well as the DFT magnitude \(|X[\mu]|\) and phase \(\varphi (X[\mu])\).
The DFT of length \(M\) is defined as $$ \mathrm{DFT}_M\{x[k]\} = X[\mu] = \sum_{k=0}^{M-1} x[k] \omega_M^{\mu k},\quad \omega_M=\mathrm e^{-\mathrm{j}\frac{2\pi}{M}},\quad \mu=0,\dots,M-1,$$ with twiddle factor \(\omega_M\) and discrete frequency \(\mu\).
DFT Correspondence Table