Labfans是一个针对大学生、工程师和科研工作者的技术社区。 论坛首页 | 联系我们(Contact Us)
MATLAB爱好者论坛-LabFans.com
返回   MATLAB爱好者论坛-LabFans.com > 其它 > 资料存档
资料存档 资料存档
 
 
主题工具 显示模式
旧 2019-12-03, 09:21   #1
poster
高级会员
 
注册日期: 2019-11-21
帖子: 3,006
声望力: 66
poster 正向着好的方向发展
默认 循环浏览多个字典项以使用小波分析降噪组合

在此先感谢您的帮助。

我正在尝试使用模仿Matlab小波函数的函数分析和绘制Python中小波去噪的所有可能组合。这涉及四个不同的变量,并且在所有变量之间进行迭代。我不确定是否可以附加和循环字典值。有关如何执行此操作的任何建议?下面是我尝试过的。

threshold = {'rigrsure','heursure','sqtwolog','minimaxi'} sorh = {'hard','soft'} scal = {'one', 'sln', 'mln'} for k in pywt.wavelist(kind='discrete'): name = k w = pywt.Wavelet(name) n = pywt.dwt_max_level(len(A), w.dec_len) for l in threshold: thres = l print(thres) for j in sorh: sorh = j print(sorh) for i in scal: scal = i print(scal) A_denoised = wden(A, thr, sorh, scal, n, name) plt.plot(A, color='blue') plt.plot(A_denoised, color='red', label=[name,l,j,i]) plt.legend(loc='upper right') plt.show()

更多&回答...
poster 当前离线   回复时引用此帖
 

主题工具
显示模式

发帖规则
不可以发表新主题
不可以发表回复
不可以上传附件
不可以编辑自己的帖子

启用 BB 代码
论坛禁用 表情符号
论坛启用 [IMG] 代码
论坛启用 HTML 代码



所有时间均为北京时间。现在的时间是 05:05


Powered by vBulletin
版权所有 ©2000 - 2025,Jelsoft Enterprises Ltd.