import itertoolsimport matplotlib.pyplot as pltimport pywtplot_data = [('db', (4, 3)),('sym', (4, 3)),('coif', (3, 2))]for family, (rows, cols) in plot_data:fig = plt.figurefig.subplots_adjust(hspace=0.2, wspace=0.2, bottom=.02, left=.06,right=.97, top=.94)colors = itertools.cycle('bgrcmyk')wnames = pywt.wavelist(family)i = iter(wnames)for col in range(cols):for row in range(rows):try:wavelet = pywt.Wavelet(next(i))except StopIteration:breakphi, psi, x = wavelet.wavefun(level=5)color = next(colors)ax = fig.add_subplot(rows, 2 * cols, 1 + 2 * (col + row * cols))ax.set_title(wavelet.name + " phi")ax.plot(x, phi, color)ax.set_xlim(min(x), max(x))ax = fig.add_subplot(rows, 2*cols, 1 + 2*(col + row*cols) + 1)ax.set_title(wavelet.name + " psi")ax.plot(x, psi, color)ax.set_xlim(min(x), max(x))for family, (rows, cols) in [('bior', (4, 3)), ('rbio', (4, 3))]:fig = plt.figurefig.subplots_adjust(hspace=0.5, wspace=0.2, bottom=.02, left=.06,right=.97, top=.94)colors = itertools.cycle('bgrcmyk')wnames = pywt.wavelist(family)i = iter(wnames)for col in range(cols):for row in range(rows):try:wavelet = pywt.Wavelet(next(i))except StopIteration:breakphi, psi, phi_r, psi_r, x = wavelet.wavefun(level=5)row *= 2color = next(colors)ax = fig.add_subplot(2*rows, 2*cols, 1 + 2*(col + row*cols))ax.set_title(wavelet.name + " phi")ax.plot(x, phi, color)ax.set_xlim(min(x), max(x))ax = fig.add_subplot(2*rows, 2*cols, 2*(1 + col + row*cols))ax.set_title(wavelet.name + " psi")ax.plot(x, psi, color)ax.set_xlim(min(x), max(x))row += 1ax = fig.add_subplot(2*rows, 2*cols, 1 + 2*(col + row*cols))ax.set_title(wavelet.name + " phi_r")ax.plot(x, phi_r, color)ax.set_xlim(min(x), max(x))ax = fig.add_subplot(2*rows, 2*cols, 1 + 2*(col + row*cols) + 1)ax.set_title(wavelet.name + " psi_r")ax.plot(x, psi_r, color)ax.set_xlim(min(x), max(x))plt.show摘要:import itertoolsimport matplotlib.pyplot as pltimport pywtplot_data = [('db', (4, 3)),('sym', (4, 3)),('coif', (3, 2))]for family,
知乎学术咨询:
https://www.zhihu.com/consult/people/792359672131756032?isMe=1担任《Mechanical System and Signal Processing》《中国电机工程学报》等期刊审稿专家,擅长领域:信号滤波/降噪,机器学习/深度学习,时间序列预分析/预测,设备故障诊断/缺陷检测/异常检测。
分割线分割线分割线
信号的交叉循环调制谱(MATLAB)
完整代码:
基于Teager-Kaiser能量算子 (TKEO)的肌电信号EMG降噪方法(MATLAB)
基于Transformer和时间嵌入的外汇股价预测(Python,ipynb文件)
完整代码:
非平稳信号的恒Q时频分析方法(Python)
完整代码:
基于经验模态分解、离散小波变换和AR模型的肌电图信号降噪(Python,ipynb文件)
来源:彤茜教育
免责声明:本站系转载,并不代表本网赞同其观点和对其真实性负责。如涉及作品内容、版权和其它问题,请在30日内与本站联系,我们将在第一时间删除内容!