yazhoulong 发表于 2013-12-11 22:18

总结前辈的EMD下载和安装,及自己的安装过程

感谢eight和shuihai707{:{39}:}
1下载完整程序的方法:
      登录以下网站:http://perso.ens-lyon.fr/patrick.flandrin/emd.html,这是flandrin的一个关于EMD和HHT的网页,进入后就可以看见主要的几个m文件,对只搞EMD的朋友这些程序就够用了,如果要进行HHT后续分析,则需要点击Time-Frequency ToolBox链接下载工具箱,具体位置在Time-Frequency ToolBox页面的download处,下载后得到tftb-0.1.tar.gz压缩包,压缩包中有个mfiles文件夹,所有程序就齐全了。

2.安装工具包    首先需要安装VC++,最好是2006以后的版本,我用的是2008,matlab版本最好也是新点的,我用的是2010b。然后启动matlab,将EMD工具箱添加到matlab路径中(File\SetPath),运行 mbuild -setup,出现
>> mbuild -setup
Please choose your compiler for building standalone MATLAB applications:

Would you like mbuild to locate installed compilers /n? y

Select a compiler:
Lcc-win32 C 2.4.1 in D:\matlab\sys\lcc
Microsoft Visual C++ 6.0 in D:\Microsoft Visual Studio

None

Compiler: 2

Please verify your choices:

Compiler: Microsoft Visual C++ 6.0
Location: D:\Microsoft Visual Studio

Are these correct /n? y
Warning: MBUILD requires that the Microsoft Visual C++ 6.0
directories "VC98" and "Common" be located within the same parent directory.
(Expected to find these directories in 'D:\Microsoft Visual Studio'.)
Trying to update options file: C:\Documents and Settings\Administrator\Application Data\MathWorks\MATLAB\R2010b\compopts.bat
From template:            D:\matlab\bin\win32\mbuildopts\msvc60compp.bat

Done . . .
3.然后运行install_emd.m
cemdc.c
cemdc.c(19) : fatal error C1083: Cannot open include file: 'complex.h': No such file or directory

D:\MATLAB\BIN\MEX.PL: Error: Compile of 'cemdc.c' failed.

cemdc.c
cio.c(121) : warning C4018: '!=' : signed/unsigned mismatch
clocal_mean.c(58) : error C2065: 'M_PI' : undeclared identifier

D:\MATLAB\BIN\MEX.PL: Error: Compile of 'cemdc.c' failed.

cemdc_fix.c
cemdc_fix.c(19) : fatal error C1083: Cannot open include file: 'complex.h': No such file or directory

D:\MATLAB\BIN\MEX.PL: Error: Compile of 'cemdc_fix.c' failed.

cemdc_fix.c
cio_fix.c(104) : warning C4018: '!=' : signed/unsigned mismatch
clocal_mean.c(58) : error C2065: 'M_PI' : undeclared identifier

D:\MATLAB\BIN\MEX.PL: Error: Compile of 'cemdc_fix.c' failed.

cemdc2.c
cemdc2.c(19) : fatal error C1083: Cannot open include file: 'complex.h': No such file or directory

D:\MATLAB\BIN\MEX.PL: Error: Compile of 'cemdc2.c' failed.

cemdc2.c
cio.c(121) : warning C4018: '!=' : signed/unsigned mismatch
clocal_mean2.c(62) : error C2065: 'M_PI' : undeclared identifier

D:\MATLAB\BIN\MEX.PL: Error: Compile of 'cemdc2.c' failed.

cemdc2_fix.c
cemdc2_fix.c(19) : fatal error C1083: Cannot open include file: 'complex.h': No such file or directory

D:\MATLAB\BIN\MEX.PL: Error: Compile of 'cemdc2_fix.c' failed.

cemdc2_fix.c
cio_fix.c(104) : warning C4018: '!=' : signed/unsigned mismatch
clocal_mean2.c(62) : error C2065: 'M_PI' : undeclared identifier

D:\MATLAB\BIN\MEX.PL: Error: Compile of 'cemdc2_fix.c' failed.

Warning: The compilation of the following files failed:
> In make_emdc at 48
In install_emd at 26
cemdc.c
cemdc_fix.c
cemdc2.c
cemdc2_fix.c


Some errors occurred during compilation. See details above.


Installation complete. Run index_emd for a list of functions.


IMPORTANT: After running INSTALL_EMD you must run the "savepath" command to save the installation
but be careful that if you previously removed parts of the path (using e.g. the "rmpath" command)
these will be permanently removed after you run "savepath"


4.成功

yazhoulong 发表于 2013-12-11 22:22

然后运行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文件。

牛小贱 发表于 2013-12-16 00:08

楼主辛苦了!谢了 很有用!{:{39}:}

yazhoulong 发表于 2014-2-1 23:23

谢谢{:{23}:}

xcb 发表于 2014-3-10 12:47

thanksgiving

xcb 发表于 2014-3-10 12:47

楼主哪个学校的?

hfutql 发表于 2014-3-13 16:03

牛人啊!!!

cyp1967 发表于 2014-6-15 16:23

应该是有更简单的安装方法!{:{23}:}

马拉多了 发表于 2014-6-26 13:51

{:{39}:}

duncon 发表于 2015-3-27 14:27

求更简便方法

yazhoulong 发表于 2015-5-17 14:10

这个是最简单的了
页: [1]
查看完整版本: 总结前辈的EMD下载和安装,及自己的安装过程