上传者: 38692928
|
上传时间: 2021-12-03 21:35:44
|
文件大小: 150KB
|
文件类型: -
低通滤波器实验代码,这是参考别人网上的代码,所以自己也分享一下,共同进步
# -*- coding: utf-8 -*-
import numpy as np
from scipy.signal import butter, lfilter, freqz
import matplotlib.pyplot as plt
def butter_lowpass(cutoff, fs, order=5):
nyq = 0.5 * fs
normal_cutoff = cutoff / nyq
b, a = butter(order, normal_cutoff, btype='low', an