資源簡介
emd分解matlab程序
代碼片段和文件信息
function?imf?=?emd(x)
%?Empiricial?Mode?Decomposition?(Hilbert-Huang?Transform)
%?EMD分解或HHT變換
%?返回值為cell類型,依次為一次IMF、二次IMF、...、最后殘差
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;
%
評論
共有 條評論