Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Inverse FFT on Sine Wave
x = np.linspace(0, 2 * np.pi * hz, points * hz)
y = np.sin(x)
plt.figure(figsize=(10, 3)), y[:75 * 10:10]) # sample every 10th element for bar graph
fft_y = fft.ifft(y.astype("complex64")) * 2
plt.figure(figsize=(10, 3)), np.absolute(fft_y[:100]))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment