資源簡(jiǎn)介
自己根據(jù)相關(guān)文獻(xiàn)編寫LMD分解程序,經(jīng)過測(cè)試效果不錯(cuò)
代碼片段和文件信息
function?[PFSI]=lmd4(x)
%?局域均值分析
%?局域均值分析
x=x‘;
c?=?x‘;
N?=?length(x);
A=?ones(1N);
PF?=?[];
SI=[];
aii?=?2*A;
while(1)
??si?=?c;
??a?=?1;
??
???while(1)
????h?=?si;
??????maxVec?=?[];
??????minVec?=?[];
??????
???%?look?for?max?and?min?point
??????for?i?=?2:?N?-?1
?????????if?h?(i-1)h(i+1)
????????????maxVec?=?[maxVec?i];?
?????????end
?????????if?h(i-1)>h?(i)&h(i) ????????????minVec?=?[minVec?i];?
?????????end?????????
??????end
??????
???%?check?if?it?is?residual
??????if?(length?(maxVec)?+?length?(minVec))?3
?????????break;
??????end
???????????
??%?handle?end?point?
??????lenmax=length(maxVec);
??????lenmin=length(minVec);
??????%left?end?point
??????if?h(1)>0
??????????if(maxVec(1) ??????????????yleft_max=h(maxVec(1));
??????????????yleft_min=-h(1);
??????????else
??????????????yleft_max=h(1);
??????????????yleft_min=h(minVec(1));
??????????end
??????else
??????????if?(maxVec(1) ??????????????yleft_max=h(maxVec(1));
??????????????yleft_min=h(1);
??????????else
??????????????yleft_max=-h(1);
??????????????yleft_min=h(minVec(1));
??????????end
??????end
??????%right?end?point
??????if?h(N)>0
??????????if(maxVec(lenmax) ?????
評(píng)論
共有 條評(píng)論