资源简介
对时间序列进行经验模式分解,适用于非线性非平稳信号
代码片段和文件信息
% EMD.M
% computes EMD (Empirical Mode Decomposition)
% inputs: - x : analysed signal (line vector)
% - t (optional) : sampling times (line vector) (default : 1:length(x))
% - stop (optional) : threshold threshold2 and tolerance (optional)
% for sifting stopping criterion
% default : [0.050.50.05]
% - tst (optional) : if equals to 1 shows sifting steps with pause
% if equals to 2 no pause
%
% outputs: - imf : intrinsic mode functions (last line = residual)
% - ort : index of orthogonality
% - nbits : number of iterations for each mode
%
% calls: - extr :finds extrema and zero-crossings
% - io : computes the index of orthogonality
function [imfortnbits] = emd(xtstoptst);
% default for stopping
defstop = [0.050.50.05];
if(nargin==1)
t = 1:length(x);
stop = defstop;
tst = 0;
end
if(nargin==2)
stop = defstop;
tst = 0;
end
if (nargin==3)
tst=0;
end
S = size(x);
if ((S(1) > 1) & (S(2) > 1)) | (length(S) > 2)
error(‘x must have only one row or one column‘)
end
if S(1) > 1
x = x‘;
end
S = size(t);
if ((S(1) > 1) & (S(2) > 1)) | (length(S) > 2)
error(‘t must have only one row or one column‘)
end
if S(1) > 1
t = t‘;
end
if (length(t)~=length(x))
error(‘x and t must have the same length‘)
end
S = size(stop);
if ((S(1) > 1) & (S(2) > 1)) | (S(1) > 3) | (S(2) > 3) | (length(S) > 2)
error(‘stop must have only one row or one column of max three elements‘)
end
if S(1) > 1
stop = stop‘;
S = size(stop);
end
if S(2) < 3
stop(3)=defstop(3);
end
if S(2) < 2
stop(2)=defstop(2);
end
sd = stop(1);
sd2 = stop(2);
tol = stop(3);
if tst
figure
end
% maximum number of iterations
MAXITERATIONS=50000;
% maximum number of symmetrized points for interpolations
NBSYM = 2;
lx = length(x);
sdt(lx) = 0;
sdt = sdt+sd;
sd2t(lx) = 0;
sd2t = sd2t+sd2;
% maximum number of extrema and zero-crossings in residual
ner = lx;
nzr = lx;
r = x;
imf = [];
k = 1;
% iterations counter for extraction of 1 mode
nbit=0;
% total iterations counter
NbIt=0;
while ner > 2
% current mode
m = r;
% mode at previous iteration
mp = m;
sx = sd+1;
% tests if enough extrema to proceed
test = 0;
[indminindmaxindzer] = extr(m);
lm=length(indmin);
lM=length(indmax);
nem=lm + lM;
nzm=length(indzer);
j=1;
% sifting loop
while ( mean(sx > sd) > tol | any(sx > sd2) | (abs(nzm-nem)>1)) & (test == 0) & nbit
if(nbit>MAXITERATIONS/5 & mod(nbitfloor(MAXITERATIONS/10))==0)
disp([‘mode ‘int2str(k)‘ nombre d iterations : ‘int2str(nbit)])
disp([‘stop parameter mean value : ‘num2str(s)])
end
% boundary conditions for interpolations :
if indmax(1) < indmin(1)
if m(1) > m(indmin(1))
lmax = fliplr(indmax(2:min(endNBSYM+1)));
lmin = fliplr(indmin(1:min(endNBSYM)));
l
- 上一篇:MIMO信道容量仿真matlab代码
- 下一篇:matlab孤立点提取函数
相关资源
- ( eemd.m )
- EEMD的代码
- eemd源程序
- G-Rilling EMD HHT Matlab 开源代码
- 带端点延拓的EMD和原始EMD的matlab程序
- 希尔伯特黄变换HHT
- 有关emd分解的matlab源程序
- emd分解matlab代码
- EEMD matlab 工具包
- 经验模态分解MATLAB程序包emd
- EMD算法的绝对实用简单版MATLAB程序
- emd分解matlab程序172943
- CEEMDAN,EEMD和EMD.rar
- MATLAB的eemd程序
- EMD matlab代码
- package_emdEMD的matlab程序
- hht变换中emd批量处理数据
- 基于G.Rilling所写EMD的MATLAB代码的中文
- EEMD总体经验模式分解算法matlab程序
- EMD HHT MATLAB源代码,适合初学者
- CEEMD代码,matlab亲测可用
- memd代码多元经验模态分解
- emd分解程序以及HHT变换
- EMD工具箱matlab
- 经验模态分解emd源代码
- 镜像延拓的emd程序
- 关于emd的使用的一个小,可以拿过去
- EMD EEMD VMD比较
- 经验模态分解EMD不带边界延拓的
- 经验模态分解CEEMDAN
评论
共有 条评论