資源簡介
里面包括IMD分解,然后求出分解分量的能量熵。你可以求出個各個樣本的能量熵然后進行分類。完美運行,你指的擁有。

代碼片段和文件信息
function?[PFresidue]?=?lmd(x)
c?=?x;
N?=?length(x);
A?=?ones(1N);
PF?=?[];
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))?2
?????????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) ?????????????yright_max=h(N);
?????????????yright_min=h(minVec(lenmin));
??????????else
??????????????yright_max=h(maxVec(lenmax));
??????????????yright_min=-h(N);
??????????end
??????else
??????????if(maxVec(lenmax) ??????????????yright_max=-h(N);
??????????????yright_min=h(minVec(lenmin));
??????????else
??????????????yright_max=h(maxVec(lenmax));
??????????????yright_min=h(N);
??????????end
??????end
??????%get?envelop?of?maxVec?and?minVec?using
??????%spline?interpolate
??????maxEnv=spline([1?maxVec?N][yleft_max?h(maxVec)?yright_max]1:N);
??????minEnv=spline([1?minVec?N][yleft_min?h(minVec)?yright_min]1:N);
??????
????mm?=?(maxEnv?+?minEnv)/2;
????aa?=?abs(maxEnv?-?minEnv)/2;
????
????mmm?=?mm;
????aaa?=?aa;
????preh?=?h;
????h?=?h-mmm;
????si?=?h./aaa;
????a?=?a.*aaa;????
????
aii?=?aaa;
????B?=?length(aii);
????C?=?ones(1B);
????bb?=?norm(aii-C);
????if(bb?1000)
????????break;
????end?????
????
???end?
???
??pf?=?a.*si;
??
??PF?=?[PF;?pf];
??
??bbb?=?length?(maxVec)?+?length?(minVec);
?%?check?if?it?is?residual
??????if?(length?(maxVec)?+?length?(minVec))?20
?????????break;
??????end
???????????
??c?=?c-pf;
end
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件????1269838??2018-11-19?10:54??新建文件夾\1224_2_2磨損擊穿C-OUT.xlsx
?????文件???????2486??2018-09-22?15:21??新建文件夾\lmd.m
?????文件???????1654??2018-11-19?10:52??新建文件夾\Unti
?????目錄??????????0??2018-11-19?10:54??新建文件夾
-----------?---------??----------?-----??----
??????????????1273978????????????????????4
- 上一篇:基于stm32單片機的水質監測
- 下一篇:開源騷客的SDRAM
評論
共有 條評論