能下载啊,不知道你那边怎么回事呢。我把程序贴下面吧。你自己copy后做成一个function就好了。
function EMDdenoised=EMDdenoise(signal,method,iterations,altermethod,nofsifts,threstype,T_mult,M1,IM2)
%EMDdenoised : denoised signal
%signal : Noisy signal
%method : EMDdenoising method
% 'IT' for Interval Thresholding (see [1]),
% 'IIT' for Iterative Interval Thresholding (see [1]),
% 'CIIT' for Clear first Iterative Interval Thresholding [1],
%iterations : Number of averaging iterations for IIT and CIIT methods
%altermethod : Noise altering method
% 'circ' for random circulations
% 'perm' for random permutations
%nofsifts : Number of sifting iterations (it should take a value
% between 5 and 10.
%threstype : Thresholding method
% 'hard' for hard Thresholding,
% 'soft' for soft Thresholding (see [2]),
% 'softSCAD' for smoothly clipped absolute deviation
% (SCAD) penalty Thresholding (see [2]).
%T_mult : Multiplication factor of the universal threshold. For
% example, if T_mult=0.7, then the threshold applied is
% T=0.7*sigma*sqrt(2*log*n)
%M1 : Value of parameter M1 in the reconstruction equation (see
% [1], Eq. (11)).
%IM2 : Sets parameter M2 (see [1], Eq. (11)) equal to the number
% of IMFs resulted from EMD decomposition minus IM2.
% REFERECIES
% [1] Y. Kopsinis, S. McLaughlin, “Development of EMD-based Denoising
% Methods Inspired by Wavelet Thresholding,” IEEE Trans. on Signal
% Processing, VOL. 57, NO. 4, APRIL 2009.
% [2] Y. Kopsinis, S. McLaughlin, “Empirical Mode Decomposition Based
% Soft-Thresholding,” EUSIPCO 2008.
warning('off','MATLAB:dispatcher:InexactMatch')
n=length(signal);
t=1:n;
if strcmp(method,'IT')==1
iterations=1;
end
[IMF,localmean] = emdfull(signal,t,nofsifts);
nofIMFs=size(IMF,1);
clear localmean
estimenergy_F(1)=(median(abs(IMF(1,:)))/0.6745)^2;
for k=2:size(IMF,1)+3
estimenergy_F(k)=estimenergy_F(1)/0.719*2.01^(-k);
end
T_mult=T_mult*sqrt(2*log(n));
M2=nofIMFs-IM2;
if strcmp(method,'CIIT')==1
clearfirst=1;
else
clearfirst=0;
end
triggered=alteringnoise(IMF,iterations,nofsifts,altermethod,clearfirst);
EMDdenoised=EMDdenoise_averaging(IMF,triggered.IMFpros,triggered.zcpos_pr,triggered.extrema_pr,estimenergy_F,threstype,T_mult,M1,M2);
end
function out_aver=EMDdenoise_averaging(IMF,IMFpros,zcpos,extrema,IMFenergy,threstype,mult,M1,M2)
% IMF: Matrix containing the IMFs
% IMFpros: Cell array containing matrices of IMFs of each different random realization
% IMFenergy: Vector containing the estimated variances of each IMF. If
% isempty [], then the energies of the n_a processed IMFpros are estimated
% separately. If it is equal to 0 then the average of all the IMFpros{} is
% adopted as the final variance
%
% mult: The multiplication factor for the Threshold computation. T=std*mult
% Lcount: The number up to which the first IMFs are excluded from the sum
% Lcount_end: In the output summations, the last Lcount_end IMFs are taken
% not from the thresholded IMFs but from the original ones
%
% out_aver: Cell array {Lcount,noiseaverages} containing the denoised signal that
% corresponds to the specific i-th Lcount and averaging up to n_a, i.e. 1:n_a
noiseaverages=length(IMFpros);
for n_a=1:noiseaverages
out_all=EMDthres_mine(IMFpros{n_a},zcpos{n_a},extrema{n_a},IMFenergy,threstype,mult);
out(n_a,:)=IMFsubsums(out_all,M1,IMFpros{n_a},M2);
end
out_aver=mean(out,1);
end
%% IMFsubsums
function out=IMFsubsums(IMFthresholded,M1,IMF,M2)
% IMFthresholded: Matrix with the thresholded IMFs.
% Lcount: The number up to which the first IMFs are excluded from the sum
% IMF: the original