FFT
Applies to: general, python, physics
An FFT computes the discrete Fourier transform efficiently, reducing typical cost from O(n^2) to O(n log n).
freq = np.fft.fftfreq(n, dt)
mag = np.abs(np.fft.fft(x))
See also: fourier-transform
Applies to: general, python, physics
An FFT computes the discrete Fourier transform efficiently, reducing typical cost from O(n^2) to O(n log n).
freq = np.fft.fftfreq(n, dt)
mag = np.abs(np.fft.fft(x))
See also: fourier-transform