gsjouc 发表于 2017-2-28 09:31

emd_sampling运行出错

一名刚开始学习EMD 的渣渣。file:///C:\Users\gsj\Documents\Tencent Files\504645739\Image\C2C\JQNB3@QP_P@]`。。。最近在学习g.rilling的程序,但是运行emd_sampling后结果如下:
论文中结果却是这样:

file:///C:\Users\gsj\AppData\Roaming\Tencent\Users\504645739\QQ\WinTemp\RichOle\63RQM90WYPTGI(BJ%I1

求问各位大神,程序哪里出错了。
附:程序代码
% EMD_SAMPLING.M
%
% P. Flandrin, Mar. 13, 2003 - modified Mar. 2, 2006
%
% computes and plots an error measure in the EMD
% estimation of a single tone
%
% produces Figure 3 in
%
% G. Rilling, P. Flandrin and P. Gon鏰lves
% "On Empirical Mode Decomposition and its algorithms"
% IEEE-EURASIP Workshop on Nonlinear Signal and Image Processing
% NSIP-03, Grado (I), June 2003

N = 256;% # of data samples
t = 1:N;
tt = fix(N/4):fix(3*N/4);

Nf = 257;% # of tested fequencies
f = logspace(-log10(2*Nf),-log10(2),Nf);

x = cos(2*pi*f'*t);

se = zeros(1,Nf);

kmin = 65;

for k = kmin:Nf-1

gsjouc 发表于 2017-2-28 09:35


william 发表于 2017-2-28 09:35

你这个结果看不到啊兄弟   另外程序报错了吗

gsjouc 发表于 2017-2-28 17:57

william 发表于 2017-2-28 09:35
你这个结果看不到啊兄弟   另外程序报错了吗

程序报了一个warning
   Warning: Log of zero.
> In emd_sampling at 41

这是我的结果
这是原文结果

gsjouc 发表于 2017-2-28 18:00

william 发表于 2017-2-28 09:35
你这个结果看不到啊兄弟   另外程序报错了吗

% EMD_SAMPLING.M
%
% P. Flandrin, Mar. 13, 2003 - modified Mar. 2, 2006
%
% computes and plots an error measure in the EMD
% estimation of a single tone
%
% produces Figure 3 in
%
% G. Rilling, P. Flandrin and P. Gon鏰lves
% "On Empirical Mode Decomposition and its algorithms"
% IEEE-EURASIP Workshop on Nonlinear Signal and Image Processing
% NSIP-03, Grado (I), June 2003

N = 256;% # of data samples
t = 1:N;
tt = fix(N/4):fix(3*N/4);

Nf = 257;% # of tested fequencies
f = logspace(-log10(2*Nf),-log10(2),Nf);

x = cos(2*pi*f'*t);

se = zeros(1,Nf);

kmin = 65;

for k = kmin:Nf-1
       
        y = x(k,:);
               
        sy = sum((y(tt)).^2);
       
        imf = emd(y);
        se(k) = sqrt(sum((imf(1,tt)-y(tt)).^2)/sy);

       
                               
end

plot(log2(f(kmin:Nf-1)),max(log2(se(kmin:Nf-1)),-60),'o-')   (警告在这里{:3_47:})
axis([-8 -1 -16 0])
xlabel('log_{2}(frequency)')
ylabel('log_{2}(error)')
hold on
plot([-8 -1],[-14 0],'r')
grid
hold off
页: [1]
查看完整版本: emd_sampling运行出错