apply butterworth filter python

Solutions on MaxInterview for apply butterworth filter python by the best coders in the world

showing results for - "apply butterworth filter python"
Kevin
22 May 2019
1>>> from scipy import signal
2>>> import matplotlib.pyplot as plt
3
Debora
26 Jul 2019
1>>> b, a = signal.butter(4, 100, 'low', analog=True)
2>>> w, h = signal.freqs(b, a)
3>>> plt.semilogx(w, 20 * np.log10(abs(h)))
4>>> plt.title('Butterworth filter frequency response')
5>>> plt.xlabel('Frequency [radians / second]')
6>>> plt.ylabel('Amplitude [dB]')
7>>> plt.margins(0, 0.1)
8>>> plt.grid(which='both', axis='both')
9>>> plt.axvline(100, color='green') # cutoff frequency
10>>> plt.show()
11