大家有没有能用的EMD程序
本帖最后由 wdhd 于 2016-9-21 11:11 编辑各位老大帮帮忙,网上的EMD程序不全,大家有没有能用的EMD程序发给我一份,maxingcellar@etang.com 谢谢大家了
[ 本帖最后由 zhangnan3509 于 2007-6-22 15:01 编辑 ]
关注中. 本帖最后由 wdhd 于 2016-9-21 11:11 编辑
同样关注中...
我也要!!
本帖最后由 wdhd 于 2016-9-21 11:12 编辑我也要EMD程序!要有的话也给我发一个!dnj0306@163.com
回复:(maxingking)[求助]大家有没有能用的EMD程序
本帖最后由 wdhd 于 2016-9-21 11:12 编辑http://vib.hit.edu.cn/vibbbs/dispbbs.asp?boardid=47&id=1355
四楼
回复:(maxingking)[求助]大家有没有能用的EMD程序
本帖最后由 wdhd 于 2016-9-21 11:12 编辑其中缺少的extr试试下面的代码
%extr
function =extr(x)
=uigetfile('*.txt','输入信号');
watchon;
FILENAME=;
x=load(FILENAME);
numzer=1;
nummin=1;
nummax=1;
for g=2:(length(x)-1)
if (x(g-1)*x(g)<0)|(x(g-1)*x(g)==0)&(x(g-1)==0)
indzer(numzer)=g-1;
numzer=numzer+1;
elseif (x(g-1)*x(g)<0)|(x(g-1)*x(g)==0)&(x(g)==0)
indzer(numzer)=g;
numzer=numzer+1;
elseif (x(g-1)*x(g)<0)|(x(g-1)*x(g)==0)&(x(g-1)~=0)&(x(g)~=0)
indzer(numzer)=(2*g-1)/2;
numzer=numzer+1;
end
if (x(g-1)>x(g))&(x(g)>x(g+1))
continue;
elseif (x(g-1)>x(g))&(x(g) indmin(nummin)=g;
nummin=nummin+1;
elseif (x(g-1) continue;
elseif (x(g-1)x(g+1))
indmax(nummax)=g;
nummax=nummax+1;
end
end
%subplot(2,3,1)
plot(indzer,x(indzer),'r-+')
title('indzer')
pause
% subplot(2,3,2)
plot(indmin,x(indmin),'b-o')
title('indmin')
pause
%subplot(2,3,3)
plot(indmax,x(indmax),'g-*')
title('indmax')
pause
%subplot(2,3,4)
plot(1:length(x),x,'k-s')
title('x')
pause
envmax = interp1(indmax,x(indmax),1:length(x),'spline');
envmin = interp1(indmin,x(indmin),1:length(x),'spline');
%subplot(2,3,5)
plot(1:length(x),envmin,'y-d')
title('envmin')
pause
%subplot(2,3,6)
plot(1:length(x),envmax,'c-h')
title('envmax')
pause
plot(1:length(x),mean((envmax+envmin)/2),'m-p')
title('mean((envmax+envmin)/2)')%extr
function =extr(x)
=uigetfile('*.txt','输入信号');
watchon;
FILENAME=;
x=load(FILENAME);
numzer=1;
nummin=1;
nummax=1;
for g=2:(length(x)-1)
if (x(g-1)*x(g)<0)|(x(g-1)*x(g)==0)&(x(g-1)==0)
indzer(numzer)=g-1;
numzer=numzer+1;
elseif (x(g-1)*x(g)<0)|(x(g-1)*x(g)==0)&(x(g)==0)
indzer(numzer)=g;
numzer=numzer+1;
elseif (x(g-1)*x(g)<0)|(x(g-1)*x(g)==0)&(x(g-1)~=0)&(x(g)~=0)
indzer(numzer)=(2*g-1)/2;
numzer=numzer+1;
end
if (x(g-1)>x(g))&(x(g)>x(g+1))
continue;
elseif (x(g-1)>x(g))&(x(g) indmin(nummin)=g;
nummin=nummin+1;
elseif (x(g-1) continue;
elseif (x(g-1)x(g+1))
indmax(nummax)=g;
nummax=nummax+1;
end
end
%subplot(2,3,1)
plot(indzer,x(indzer),'r-+')
title('indzer')
pause
% subplot(2,3,2)
plot(indmin,x(indmin),'b-o')
title('indmin')
pause
%subplot(2,3,3)
plot(indmax,x(indmax),'g-*')
title('indmax')
pause
%subplot(2,3,4)
plot(1:length(x),x,'k-s')
title('x')
pause
envmax = interp1(indmax,x(indmax),1:length(x),'spline');
envmin = interp1(indmin,x(indmin),1:length(x),'spline');
%subplot(2,3,5)
plot(1:length(x),envmin,'y-d')
title('envmin')
pause
%subplot(2,3,6)
plot(1:length(x),envmax,'c-h')
title('envmax')
pause
plot(1:length(x),mean((envmax+envmin)/2),'m-p')
title('mean((envmax+envmin)/2)')%extr
function =extr(x)
=uigetfile('*.txt','输入信号');
watchon;
FILENAME=;
x=load(FILENAME);
numzer=1;
nummin=1;
nummax=1;
for g=2:(length(x)-1)
if (x(g-1)*x(g)<0)|(x(g-1)*x(g)==0)&(x(g-1)==0)
indzer(numzer)=g-1;
numzer=numzer+1;
elseif (x(g-1)*x(g)<0)|(x(g-1)*x(g)==0)&(x(g)==0)
indzer(numzer)=g;
numzer=numzer+1;
elseif (x(g-1)*x(g)<0)|(x(g-1)*x(g)==0)&(x(g-1)~=0)&(x(g)~=0)
indzer(numzer)=(2*g-1)/2;
numzer=numzer+1;
end
if (x(g-1)>x(g))&(x(g)>x(g+1))
continue;
elseif (x(g-1)>x(g))&(x(g) indmin(nummin)=g;
nummin=nummin+1;
elseif (x(g-1) continue;
elseif (x(g-1)x(g+1))
indmax(nummax)=g;
nummax=nummax+1;
end
end
%subplot(2,3,1)
plot(indzer,x(indzer),'r-+')
title('indzer')
pause
% subplot(2,3,2)
plot(indmin,x(indmin),'b-o')
title('indmin')
pause
%subplot(2,3,3)
plot(indmax,x(indmax),'g-*')
title('indmax')
pause
%subplot(2,3,4)
plot(1:length(x),x,'k-s')
title('x')
pause
envmax = interp1(indmax,x(indmax),1:length(x),'spline');
envmin = interp1(indmin,x(indmin),1:length(x),'spline');
%subplot(2,3,5)
plot(1:length(x),envmin,'y-d')
title('envmin')
pause
%subplot(2,3,6)
plot(1:length(x),envmax,'c-h')
title('envmax')
pause
plot(1:length(x),mean((envmax+envmin)/2),'m-p')
title('mean((envmax+envmin)/2)')%extr
function =extr(x)
=uigetfile('*.txt','输入信号');
watchon;
FILENAME=;
x=load(FILENAME);
numzer=1;
nummin=1;
nummax=1;
for g=2:(length(x)-1)
if (x(g-1)*x(g)<0)|(x(g-1)*x(g)==0)&(x(g-1)==0)
indzer(numzer)=g-1;
numzer=numzer+1;
elseif (x(g-1)*x(g)<0)|(x(g-1)*x(g)==0)&(x(g)==0)
indzer(numzer)=g;
numzer=numzer+1;
elseif (x(g-1)*x(g)<0)|(x(g-1)*x(g)==0)&(x(g-1)~=0)&(x(g)~=0)
indzer(numzer)=(2*g-1)/2;
numzer=numzer+1;
end
if (x(g-1)>x(g))&(x(g)>x(g+1))
continue;
elseif (x(g-1)>x(g))&(x(g) indmin(nummin)=g;
nummin=nummin+1;
elseif (x(g-1) continue;
elseif (x(g-1)x(g+1))
indmax(nummax)=g;
nummax=nummax+1;
end
end
%subplot(2,3,1)
plot(indzer,x(indzer),'r-+')
title('indzer')
pause
% subplot(2,3,2)
plot(indmin,x(indmin),'b-o')
title('indmin')
pause
%subplot(2,3,3)
plot(indmax,x(indmax),'g-*')
title('indmax')
pause
%subplot(2,3,4)
plot(1:length(x),x,'k-s')
title('x')
pause
envmax = interp1(indmax,x(indmax),1:length(x),'spline');
envmin = interp1(indmin,x(indmin),1:length(x),'spline');
%subplot(2,3,5)
plot(1:length(x),envmin,'y-d')
title('envmin')
pause
%subplot(2,3,6)
plot(1:length(x),envmax,'c-h')
title('envmax')
pause
plot(1:length(x),mean((envmax+envmin)/2),'m-p')
title('mean((envmax+envmin)/2)')%extr
function =extr(x)
=uigetfile('*.txt','输入信号');
watchon;
FILENAME=;
x=load(FILENAME);
numzer=1;
nummin=1;
nummax=1;
for g=2:(length(x)-1)
if (x(g-1)*x(g)<0)|(x(g-1)*x(g)==0)&(x(g-1)==0)
indzer(numzer)=g-1;
numzer=numzer+1;
elseif (x(g-1)*x(g)<0)|(x(g-1)*x(g)==0)&(x(g)==0)
indzer(numzer)=g;
numzer=numzer+1;
elseif (x(g-1)*x(g)<0)|(x(g-1)*x(g)==0)&(x(g-1)~=0)&(x(g)~=0)
indzer(numzer)=(2*g-1)/2;
numzer=numzer+1;
end
if (x(g-1)>x(g))&(x(g)>x(g+1))
continue;
elseif (x(g-1)>x(g))&(x(g) indmin(nummin)=g;
nummin=nummin+1;
elseif (x(g-1) continue;
elseif (x(g-1)x(g+1))
indmax(nummax)=g;
nummax=nummax+1;
end
end
%subplot(2,3,1)
plot(indzer,x(indzer),'r-+')
title('indzer')
pause
% subplot(2,3,2)
plot(indmin,x(indmin),'b-o')
title('indmin')
pause
%subplot(2,3,3)
plot(indmax,x(indmax),'g-*')
title('indmax')
pause
%subplot(2,3,4)
plot(1:length(x),x,'k-s')
title('x')
pause
envmax = interp1(indmax,x(indmax),1:length(x),'spline');
envmin = interp1(indmin,x(indmin),1:length(x),'spline');
%subplot(2,3,5)
plot(1:length(x),envmin,'y-d')
title('envmin')
pause
%subplot(2,3,6)
plot(1:length(x),envmax,'c-h')
title('envmax')
pause
plot(1:length(x),mean((envmax+envmin)/2),'m-p')
title('mean((envmax+envmin)/2)')%extr
function =extr(x)
=uigetfile('*.txt','输入信号');
watchon;
FILENAME=;
x=load(FILENAME);
numzer=1;
nummin=1;
nummax=1;
for g=2:(length(x)-1)
if (x(g-1)*x(g)<0)|(x(g-1)*x(g)==0)&(x(g-1)==0)
indzer(numzer)=g-1;
numzer=numzer+1;
elseif (x(g-1)*x(g)<0)|(x(g-1)*x(g)==0)&(x(g)==0)
indzer(numzer)=g;
numzer=numzer+1;
elseif (x(g-1)*x(g)<0)|(x(g-1)*x(g)==0)&(x(g-1)~=0)&(x(g)~=0)
indzer(numzer)=(2*g-1)/2;
numzer=numzer+1;
end
if (x(g-1)>x(g))&(x(g)>x(g+1))
continue;
elseif (x(g-1)>x(g))&(x(g) indmin(nummin)=g;
nummin=nummin+1;
elseif (x(g-1) continue;
elseif (x(g-1)x(g+1))
indmax(nummax)=g;
nummax=nummax+1;
end
end
%subplot(2,3,1)
plot(indzer,x(indzer),'r-+')
title('indzer')
pause
% subplot(2,3,2)
plot(indmin,x(indmin),'b-o')
title('indmin')
pause
%subplot(2,3,3)
plot(indmax,x(indmax),'g-*')
title('indmax')
pause
%subplot(2,3,4)
plot(1:length(x),x,'k-s')
title('x')
pause
envmax = interp1(indmax,x(indmax),1:length(x),'spline');
envmin = interp1(indmin,x(indmin),1:length(x),'spline');
%subplot(2,3,5)
plot(1:length(x),envmin,'y-d')
title('envmin')
pause
%subplot(2,3,6)
plot(1:length(x),envmax,'c-h')
title('envmax')
pause
plot(1:length(x),mean((envmax+envmin)/2),'m-p')
title('mean((envmax+envmin)/2)')
本帖最后由 wdhd 于 2016-9-21 11:12 编辑
各位兄弟好,请问谁有EMD的matlab程序,本人也在搞这个
想要个程序参考参考,多谢!my123_@sohu.com
我是个新手,请问高手,是不是要把那个缺少的extr代码复制到原来的EMD程序中才能使用?<BR>多谢了!<BR>还有,如果哪位高手有了完整的程序了,请发给我一个<BR>多谢!rzhang_838@163.com
仁兄!!!
本帖最后由 wdhd 于 2016-9-21 11:12 编辑各位兄弟!!!
我也想要一个EMD程序嗄!!!
谢谢
回复:(sealily)我是个新手,请问高手,是不是要把那...
本帖最后由 wdhd 于 2016-9-21 11:13 编辑以下是引用sealily在2006-3-24 14:06:35的发言:
我是个新手,请问高手,是不是要把那个缺少的extr代码复制到原来的EMD程序中才能使用?
多谢了!
还有,如果哪位高手有了完整的程序了,请发给我一个
多谢!rzhang_838@163.com
是的,建立extr.m文件,文件内容上面已经贴了
本帖最后由 wdhd 于 2016-9-21 11:13 编辑
elseif (x(g-1)>x(g))&(x(g) indmin(nummin)=g;
nummin=nummin+1;
elseif (x(g-1) continue;
elseif (x(g-1)x(g+1))
indmax(nummax)=g;
nummax=nummax+1;
end
end
%subplot(2,3,1)
这段代码有问题啊
emd.m急需中
页:
[1]