我也是新手,接触EMD不久,关于EMD工具箱的帖子论坛上也有好多,看了一下这些帖子,把帖子总结一下,就算为初学者提供一个便利吧。EMD工具箱有好多,用的最多的还是G. Rilling 2007年6月27日版本的,可以到zhlong.ys168.com下载,上面还有时频工具箱,对于做信号时频分析的同学很有用,至于更新的 G. Rilling 版本程序,论坛上我没找到。 首先需要安装VC++,最好是2006以后的版本,我用的是2008,matlab版本最好也是新点的,我用的是2010b。然后启动matlab,将EMD工具箱添加到matlab路径中(File\SetPath),运行 mbuild -setup,出现
Please choose your compiler for building standalone MATLAB applications:
Would you like mbuild to locate installed compilers [y]/n? y
Select a compiler:
[1] Lcc-win32 C 2.4.1 in C:\PROGRA~1\MATLAB\R2010b\sys\lcc
[2] Microsoft Visual C++ 2008 SP1 in C:\Program Files\Microsoft Visual Studio 9.0
[0] None
Compiler: 2
Please verify your choices:
Compiler: Microsoft Visual C++ 2008 SP1
Location: C:\Program Files\Microsoft Visual Studio 9.0
Are these correct [y]/n? y
运行mex -setup,出现
Please choose your compiler for building external interface (MEX) files:
Would you like mex to locate installed compilers [y]/n? y
Select a compiler:
[1] Lcc-win32 C 2.4.1 in C:\PROGRA~1\MATLAB\R2010b\sys\lcc
[2] Microsoft Visual C++ 2008 SP1 in C:\Program Files\Microsoft Visual Studio 9.0
[0] None
Compiler: 2
Please verify your choices:
Compiler: Microsoft Visual C++ 2008 SP1
Location: C:\Program Files\Microsoft Visual Studio 9.0
Are these correct [y]/n? y
然后运行install_emd.m,会出现“cemdc.c(19) : fatal error C1083: 无法打开包括文件:“complex.h”: No such file or directory”类似这样的提示。这里我参考了G. Rilling 程序,安装没有complex.h解决方法!这个帖子提供的解决方法,将EMDS/make_emdc.m的第28行mex(’-DC99_OK‘,args(:))语句中的 '-DC99_OK' 去掉,然后在EMDs\src相应的头文件(clocal_mean.h和clocal_mean2.h)中加入M_PI的宏定义即可,在两个.h文件中分别加入以下语句:
#define CLOCAL_MEAN_H
#ifndef M_PI
#define M_PI 3.1415926
#endif %红色部分为添加的语句
最后运行install_emd.m,会提示安装成功Compilation successfull Installation complete. Run index_emd for a list of functions.安装完成后,EMDs文件夹中会出现.mexw32文件。
不好意思,这种请情况我没遇到,我的系统是XP的SP3版,32位。运行install_emd.m,出没出现“cemdc.c(19) : fatal error C1083: 无法打开包括文件:“complex.h”: No such file or directory”类似这样的提示?如果出现了,就按照G. Rilling 程序,安装没有complex.h解决方法!这个帖子提供的解决方法,如果没出现,可能是其他问题了,我也无法提供解决方法,还请高手指教吧。