MATLAB爱好者论坛-LabFans.com

MATLAB爱好者论坛-LabFans.com (https://www.labfans.com/bbs/index.php)
-   资料存档 (https://www.labfans.com/bbs/forumdisplay.php?f=72)
-   -   循环浏览多个字典项以使用小波分析降噪组合 (https://www.labfans.com/bbs/showthread.php?t=22360)

poster 2019-12-03 09:21

循环浏览多个字典项以使用小波分析降噪组合
 
在此先感谢您的帮助。

我正在尝试使用模仿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()

[url=https://stackoverflow.com/q/59148922]更多&回答...[/url]


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

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