急求1个非riling算法的程序,不胜感激!!
正在做一个比较采用riling算法和不采用riling算法所得结果优越性的实验,求其相关系数。所以需要一个不采用riling算法的程序。 基本都是riling算放及其相关的延伸,
我这里有一个忘记从哪里下载的了,给你看一下希望对你有所帮助,此外EEMD(x,0,1)也跟emd一样,建议你看一下。
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 = getspline(x)
N = length(x);
p = findpeaks(x);
s = spline(,,1:N);
回复 沙发 杨德昌 的帖子
好的,谢谢!
页:
[1]