|
楼主 |
发表于 2008-5-5 11:37
|
显示全部楼层
回复 3楼 的帖子
fs=400;
tspan=2;
t=1/fs:1/fs:tspan;
N=length(t);
x1=sin(2*pi*20*t);
x2=0.4*sin(2*pi*40*t+140);
z=x1+x2;
y= linspace(1,2,800);%添加趋势项
z=z+y;
imf=emd(z);
[A,fa,tt]=hhspectrum(imf);
[im,tt1]=toimage(A,fa,tt,length(tt));
disp_hhs_lp(im);
这个程序会出现这种情况,下面是我的程序
t=0:0.001:1;
x=chirp(t,2,1,100);
plot(t,x);grid;
T=1:length(x);
stop=[0.05,0.5,0.05];
imf=emd(x,t,stop);
emd_visu(x,T,imf,1);
[A,fa,tt]=hhspectrum(imf);
[E,tt1]=toimage(A,fa,tt,length(tt));
??? Error: File: toimage.m Line: 58 Column: 1
This statement is not inside any function.
(It follows the END that terminates the definition of the function "toimage".)
打开toimage.m58行:
lt=length(t);
情况一样,不知道为什么,我把toimage.m也传上来,见1楼
[ 本帖最后由 ambiguous 于 2008-5-5 11:56 编辑 ] |
|