Last active
March 14, 2018 13:40
-
-
Save heltonbiker/593f88983e23fc4e807bbfc2267d6195 to your computer and use it in GitHub Desktop.
FFT with Numpy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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