Skip to content

Instantly share code, notes, and snippets.

@heltonbiker
Last active March 14, 2018 13:40
Show Gist options
  • Save heltonbiker/593f88983e23fc4e807bbfc2267d6195 to your computer and use it in GitHub Desktop.
Save heltonbiker/593f88983e23fc4e807bbfc2267d6195 to your computer and use it in GitHub Desktop.
FFT with Numpy
import numpy as np
import matplotlib.pyplot as plt
lenfft = len(sinal)/2.
nyq = sampling_rate/2.
freq_axis = np.linspace(0, nyq, lenfft+1)
spectrum = np.abs(np.fft.rfft(sinal))
plt.plot(freq_axis, spectrum)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment