www.gusucode.com > wavelet 源码程序 matlab案例代码 > wavelet/Denoise1DSignalUsingDefaultGlobalThreshExample.m
%% Denoise 1-D Signal Using Default Global Threshold % Denoise 1-D electricity consumption data using the Donoho-Johnstone global % threshold. %% % Load the signal and select a segment for denoising. load leleccum; indx = 2600:3100; x = leleccum(indx); %% % Use |ddencmp| to determine the default global threshold and denoise the % signal. Plot the original and denoised signals. [thr,sorh,keepapp] = ddencmp('den','wv',x); xd = wdencmp('gbl',x,'db3',2,thr,sorh,keepapp); subplot(211) plot(x); title('Original Signal'); subplot(212) plot(xd); title('Denoised Signal');