wthresh 函数会将低于阈值的所有值设置为零。看起来你的大部分信号都在 0.4 以上,所以它没有太大的影响。这就是(硬)阈值为 1.3 时的样子:
小波变换类似于加窗傅里叶变换。它将输入信号分解为子信号,这些子信号基本上表示原始信号的不同频率分量。优点是它保留了基于时间的信息,并且可以适应数据。然后可以对这些子信号进行阈值处理并重新组合在一起,以对原始信号进行频率目标去噪(与基于幅度的阈值处理相反)。因此,要回答您的问题,不,它们不会相同。
这是一个相当大的话题,可能需要一些时间来理解它。我建议从here 开始了解小波部分,并从here 开始了解 Matlab 中的小波入门。 Here 是一篇关于去噪的精彩文章,但我强烈建议您先打好理论基础。
小波去噪可能非常挑剔,并且有很多参数可供试验。例如,使用哪个小波,使用哪个阈值策略,分解到多少级别等。基本上你需要玩很多。
快速实现它的最简单方法是使用wden。这是从docs 中提取的示例:
% Set signal to noise ratio and set rand seed.
snr = 3; init = 2055615866;
% Generate original signal and a noisy version adding
% a standard Gaussian white noise.
[xref, x] = wnoise(3, 11, snr, init);
% De-noise noisy signal using soft heuristic SURE thresholding
% and scaled noise option, on detail coefficients obtained
% from the decomposition of x, at level 5 by sym8 wavelet.
lev = 5;
xd = wden(x, 'heursure', 's', 'one', lev, 'sym8');
% Plot signals.
subplot(611), plot(xref), axis([1 2048 -10 10]);
title('Original signal');
subplot(612), plot(x), axis([1 2048 -10 10]);
title(['Noisy signal - Signal to noise ratio = ',...
num2str(fix(snr))]);
subplot(613), plot(xd), axis([1 2048 -10 10]);
title('De-noised signal - heuristic SURE');
结果: