声振论坛

 找回密码
 我要加入

QQ登录

只需一步,快速开始

查看: 1944|回复: 4

[HHT] emd_sampling运行出错

[复制链接]
发表于 2017-2-28 09:31 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?我要加入

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

[img]file:///C:\Users\gsj\AppData\Roaming\Tencent\Users\504645739\QQ\WinTemp\RichOle\63RQM90WYPTGI(BJ%I1[9OV.png[/img]

求问各位大神,程序哪里出错了。
附:程序代码
% 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
回复
分享到:

使用道具 举报

 楼主| 发表于 2017-2-28 09:35 | 显示全部楼层
63RQM90WYPTGI(BJ%I1[9OV.png QQ图片20170228092745.jpg
发表于 2017-2-28 09:35 | 显示全部楼层
你这个结果看不到啊  兄弟   另外程序报错了吗
 楼主| 发表于 2017-2-28 17:57 | 显示全部楼层
william 发表于 2017-2-28 09:35
你这个结果看不到啊  兄弟   另外程序报错了吗

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

QQ图片20170228092745.jpg 这是我的结果
63RQM90WYPTGI(BJ%I1[9OV.png 这是原文结果

 楼主| 发表于 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);

        [k size(imf)]
                               
end

plot(log2(f(kmin:Nf-1)),max(log2(se(kmin:Nf-1)),-60),'o-')     (警告在这里
axis([-8 -1 -16 0])
xlabel('log_{2}(frequency)')
ylabel('log_{2}(error)')
hold on
plot([-8 -1],[-14 0],'r')
grid
hold off
您需要登录后才可以回帖 登录 | 我要加入

本版积分规则

QQ|小黑屋|Archiver|手机版|联系我们|声振论坛

GMT+8, 2024-3-29 14:26 , Processed in 0.084326 second(s), 25 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表