Fourier (small sample)

Inspect a real signal and its one-sided amplitude spectrum, with all complex DFT coefficients.

About this tool

Enter 2–256 uniformly sampled real values or choose an example, then Calculate. Both plots use the actual input and computed coefficients. The stem spectrum shows discrete bins, not an interpolated continuous Fourier transform. Input edits invalidate results. Resize redraws cached data; CSV contains every unscaled complex coefficient and signed frequency. PNG contains both plots and the actual samples.

Convention: X[k]=Σx[n]exp(−2πikn/N), inverse x[n]=(1/N)ΣX[k]exp(+2πikn/N). Arbitrary lengths within the limit, not just powers of two. Frequency is cycles/sample; with a known sample rate fₛ, physical frequency is f·fₛ. The full coefficient table uses signed FFT order: bins above the positive half represent negative frequencies. Even N represents its Nyquist bin as −½ there; the one-sided plot represents the same bin as +½.

For real input the conjugate half is redundant. One-sided amplitudes are |X|/N at DC and, for even N only, Nyquist, otherwise 2|X|/N. Odd N has no Nyquist bin; its last positive bin is doubled. These are bin amplitudes, not power spectral density or a noise-free continuous sinusoid fit. Off-bin frequencies leak; finite samples can alias. No detrending, windowing or zero padding is applied.

Phase is in radians. A dash denotes an unresolved coefficient at the relative floating-point tolerance 32·EPS·N against A=max|x|; amplitudes and complex coefficients remain unsnapped. Very weak phases can therefore be unavailable. Roots at exact quarter turns are represented exactly; other roots and sums have finite floating precision.

Checks use energy divided by A², inverse/symmetry residuals divided by A, so very large/small signals do not produce misleading infinite or zero energies. A=1 for an all-zero signal. Checks refer to the actually restored/exported coefficients, including subnormal rounding. Extreme plots use a labeled axis scale; inputs/exports are unchanged. Unrepresentable coefficients are rejected. The bounded direct DFT uses cached roots and compensated sums, keeping this small tool responsive without a worker.

NumPy · DFT · MathWorks · Amplitudes

Inputs, open panels and completed coefficients are saved locally. Fresh or edited inputs wait for Calculate; completed coefficients are restored without a new Fourier transform. Source binding, shape, energy and symmetry checks detect inconsistent caches; they are not a tamper-proof independent transform.

Only input values are remembered in this browser. Calculated results and experiment histories are not saved.