ceemd分解,可以运行
ceemd分解信号,得到imf分量,然后在按照你自己的想法做你,可以运行,请好评,缺积分,谢谢。
代码片段和文件信息
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 492624 2018-05-21 16:17 ceemd分解Ain.mat
文件 578563 2018-05-22 20:27 ceemd分解Bin.mat
文件 2603 2014-04-01 21:11 ceemd分解ceemd.m
文件 2180 2011-10-21 09:02 ceemd分解extrema.m
文件 929 2018-10-15 10:26 ceemd分解fenjie.m
目录 0 2018-10-15 10:26 ceemd分解
----------- --------- ---------- ----- ----
1076899 6
% Y: Inputted data;
% Nstd: ratio of the standard deviation of the added noise and that of Y;
% NE: Ensemble member being used
% TNM: total number of modes (not including the trend)
%
function allmode=ceemd(YNstdNETNM)
% find data length
xsize=length(Y);
dd=1:1:xsize;
% Nornaliz data
Ystd=std(Y);
Y=Y/Ystd;
% Initialize saved data
TNM2=TNM+2;
for kk=1:1:TNM2
for ii=1:1:xsize
allmode(iikk)=0.0;
end
end
for iii=1:1:NE
% adding noise
for i=1:xsize
temp=randn(11)*Nstd;
X1(i)=Y(i)+temp;
X2(i)=Y(i)-temp;
end
% sifting X1
xorigin = X1;
xend = xorigin;
% save the initial data into the first column
for jj=1:1:xsize
mode(jj1) = xorigin(jj);
end
nmode = 1;
while nmode <= TNM
xstart = xend;
iter = 1;
while iter<=5
[spmax spmin flag]=extrema(xstart);
upper= spline(spmax(:1)spmax(:2)dd);
lower= spline(spmin(:1)spmin(:2)dd);
mean_ul = (upper + lower)/2;
xstart = xstart - mean_ul;
iter = iter +1;
end
xend = xend - xstart;
nmode=nmode+1;
% save a mode
for jj=1:1:xsize
mode(jjnmode) = xstart(jj);
end
end
% save the trend
for jj=1:1:xsize
mode(jjnmode+1)=xend(jj);
end
% add mode to the sum of modes from earlier ensemble members
allmode=allmode+mode;
%%%=============================================================
% sifting X2
xorigin = X2;
xend = xorigin;
% save the initial data into the first column
for jj=1:1:xsize
mode(jj1) = xorigin(jj);
end
nmode = 1;
while nmode <= TNM
xstart = xend;
iter = 1;
while iter<=5
[spmax spmin flag]=extrema(xstart);
upper= spline(spmax(:1)spmax(:2)dd);
lower= spline(spmin(:1)spmin(:2)dd);
mean_ul = (upper + lower)/2;
xstart = xstart - mean_ul;
iter = iter +1;
end
xend = xend - xstart;
nmode=nmode+1;
% save a mode
for jj=1:1:xsize
mode(jjnmode) = xstart(jj);
end
end
% save the trend
for jj=1:1:xsize
mode(jjnmode+1)=xend(jj);
end
% add mode to the sum of modes from earlier ensemble members
allmode=allmode+mode;
%fprintf(‘-‘);
end
% ensemble average
allmode=allmode/NE/2;
% Rescale mode to origional unit.
allmode=allmode*Ystd;
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 492624 2018-05-21 16:17 ceemd分解Ain.mat
文件 578563 2018-05-22 20:27 ceemd分解Bin.mat
文件 2603 2014-04-01 21:11 ceemd分解ceemd.m
文件 2180 2011-10-21 09:02 ceemd分解extrema.m
文件 929 2018-10-15 10:26 ceemd分解fenjie.m
目录 0 2018-10-15 10:26 ceemd分解
----------- --------- ---------- ----- ----
1076899 6
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件举报,一经查实,本站将立刻删除。
评论列表(条)