Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- order =5
- fs = 500.0
- cutoff =0.5
- nyq = 0.5 * fs
- normal_cutoff = cutoff / nyq
- b, a = signal.butter(order,normal_cutoff,btype='high',analog=False)
- plt.figure()
- w, h = freqz(b, a, worN=8000)
- plt.subplot(2, 1, 1)
- plt.plot(0.5*fs*w/np.pi, np.abs(h), 'b')
- plt.plot(cutoff, 0.5*np.sqrt(2), 'ko')
- plt.axvline(cutoff, color='k')
- plt.xlim(0,20)
- plt.ylabel('Amplitude [dB]')
- plt.title("Highpass Filter Frequency Response")
- plt.xlabel('Frequency [Hz]')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement