local_emd.m中代码请教 ^_^
在G.Rilling local_emd.m中,下面这段代码怎么读不懂啊,烦请高人给点拨一二……Q:
1. 此段代码在此任何用意(“ON EMPIRICAL MODE DECOMPOSITION AND ITS ALGORITHMS”中似乎并未说明);
2. 另外程序在 line155 中出现了一个 'j' 却也不知作何用?/ line163中的'num2str(s)' 中的 ‘s’也不知从何而来;
3. 这部分代码对整个EMD分解会不会有较大影响?
谢谢!!!:@)
% definition of f equal to 1 where sifting is needed and
% decays fast to 0 in the neighbourhood
badsx = (sx > sd & amp > mamp/20) | (sx > sd2 & amp > mamp/100);
d = diff();
debs = find(d==1);
fins = find(d==-1)-1;
if length(debs)~=length(fins)
error('pb avec le regroupement en composantes connexes')
end
indextr = sort();
d = diff(indextr);
f = [];
connexe = [];
lc = length(debs);
if lc > 0
connexe(lc,lx) = 0;
for i = 1:lc
connexe(i,debs(i):fins(i)) = 1;
% indices of previous and next extrema
indp = min();
inds = max();
% evaluation of extrema densities left and right
llarg = mean(d(min()]):max()])));
rlarg = mean(d(min()]):max()])));
larg = mean();
% special cases...
if indp == 0
if inds ~= (nem+1)
larg = (indextr(inds)-indextr(inds-1));
else
larg = round(lx/2);
end
else
ifinds ~= (nem+1)
larg = max([(indextr(inds)-indextr(inds-1)),(indextr(indp+1)-indextr(indp))]);
else
larg =(indextr(indp+1)-indextr(indp));
end
end
larg = 2*max();
w(1:round(larg/2)) = /round(larg/2);
w((2*larg+2-round(larg/2)):(2*larg+1)) = fliplr(w(1:round(larg/2)));
w(round(larg/2):(2*larg+2-round(larg/2))) = 1;
indd = max(1,debs(i)-larg);
indf = min(lx,fins(i)+larg);
connexe(i,indd:debs(i)) = w((larg+1-debs(i)+indd):(larg+1));
connexe(i,fins(i):indf) = w((larg+1):(larg+1+indf-fins(i)));
end
f = max(connexe,[],1);
else
f(lx) = 0;
end
m = m - f.*envmoy;
= extr(m);
lm=length(indmin);
lM=length(indmax);
nem = lm + lM;
nzm = length(indzer); 看来大家都很忙啊,还望有时间的时候给解释一下……:@) :@) :@)
页:
[1]