Pas encore de compte ?
Testé sous Anaconda et Python 3.7
from scipy import signal import matplotlib.pyplot as plt import numpy as np b, a = signal.ellip(4, 5, 40, 100, 'low', analog=True) w, h = signal.freqs(b, a) plt.semilogx(w, 20 * np.log10(abs(h))) plt.title('Elliptic filter frequency response (rp=5, rs=40)') plt.xlabel('Frequency [radians / second]') plt.ylabel('Amplitude [dB]') plt.margins(0, 0.1) plt.grid(which='both', axis='both') plt.axvline(100, color='green') # cutoff frequency plt.axhline(-40, color='green') # rs plt.axhline(-5, color='green') # rp plt.show()
Testé sous Anaconda et Python 3.7
from scipy import signal import matplotlib.pyplot as plt import numpy as np N, Wn = signal.ellipord(30, 10, 3, 60, True) b, a = signal.ellip(N, 3, 60, Wn, 'high', True) w, h = signal.freqs(b, a, np.logspace(0, 3, 500)) plt.semilogx(w, 20 * np.log10(abs(h))) plt.title('Elliptical highpass filter fit to constraints') plt.xlabel('Frequency [radians / second]') plt.ylabel('Amplitude [dB]') plt.grid(which='both', axis='both') plt.fill([.1, 10, 10, .1], [1e4, 1e4, -60, -60], '0.9', lw=0) # stop plt.fill([30, 30, 1e9, 1e9], [-99, -3, -3, -99], '0.9', lw=0) # pass plt.axis([1, 300, -80, 3]) plt.show()
Bienvenu, je m’appelle Eric Soupet et je suis l'administrateur du site elodees.com. elodees.com est un état de l'art de l'Intelligence Artificielle et se veut collaboratif, vous pouvez dès à présent proposer du contenu tels que des articles, des événements, des tutoriels, ... alors n'hésitez pas !
Crédit des images de la plate-forme : Pixabay - Pixabay License | Pexels - Pexels License