資源簡介
用于經(jīng)驗(yàn)?zāi)B(tài)分解的matlab程序,這個版本的代碼比較簡單,容易看懂。
代碼片段和文件信息
function?imf?=?emd(x)
%?Empiricial?Mode?Decomposition?(Hilbert-Huang?Transform)
%?imf?=?emd(x)
%?Func?:?findpeaks
x???=?transpose(x(:));
imf?=?[];
while?~ismonotonic(x)
???x1?=?x;
???sd?=?Inf;
???while?(sd?>?0.1)?|?~isimf(x1)
??????s1?=?getspline(x1);
??????s2?=?-getspline(-x1);
??????x2?=?x1-(s1+s2)/2;
??????
??????sd?=?sum((x1-x2).^2)/sum(x1.^2);
??????x1?=?x2;
???end
???
???imf{end+1}?=?x1;
???x??????????=?x-x1;
end
imf{end+1}?=?x;
%?FUNCTIONS
function?u?=?ismonotonic(x)
u1?=?length(findpeaks(x))*length(findpeaks(-x));
if?u1?>?0?u?=?0;
else??????u?=?1;?end
function?u?=?isimf(x)
N??=?length(x);
u1?=?sum(x(1:N-1).*x(2:N)?0);
u2?=?length(findpeaks(x))+length(findpeaks(-x));
if?abs(u1-u2)?>?1?u?=?0;
else??????????????u?=?1;?end
function?s
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件????????893??2008-03-13?11:49??plot_hht\emd.m
?????文件????????146??2007-08-26?00:42??plot_hht\findpeaks.m
?????文件?????958087??2007-01-25?14:59??plot_hht\HHT.pdf
?????文件?????102892??2007-04-28?15:57??plot_hht\Hum.wav
?????文件????????965??2008-04-24?13:36??plot_hht\plot_hht.m
?????目錄??????????0??2010-04-16?00:31??plot_hht
-----------?---------??----------?-----??----
??????????????1062983????????????????????6
- 上一篇:車道偏移預(yù)警系統(tǒng)
- 下一篇:高程異常代碼
評論
共有 條評論