1、首先下载emd工具箱。下载后解压放在matlab的work工作路径下package_emd文件夹。
2、打开matlab,选择File- Set Path- Add with Subfolders-你刚才下载的工具箱(package_emd)点进去- Save- Close。
3、此时选择work下package_emd文件夹作为工作路径,即是D:\matlabR2006b\work\package_emd。
4、在Command Window里面第一步输入: mbuild -setup 回车,问是否选择已有的编译器你选y回车,再问选择哪个编译器,你可以选择C++的那个选择相应的编号(如 2)回车,然后让你核对是否选择对了编译器等等,你输入y回车 第二步输入:mex -setup回车,问是否选择已有的编译器你选y回车,再问选择哪个编译器,你可以选择C++的那个选择相应的编号(如 2)回车,然后让你核对是否选择对了编译器等等,你输入y回车 第三步输入:install_emd 回车,问是否选择已有的编译器你选y回车,再问选择哪个编译器,你可以选择C++的那个选择相应的编号(如 2)回车,然后让你核对是否选择对了编译器等等,你输入y回车5,恭喜你安装成功了了下边是过程第一步输入: mbuild -setup 回车 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 D:\MATLAB~1\sys\lcc
[2] Microsoft Visual C++ 6.0 in C:\Program Files\Microsoft Visual Studio
[0] None
Compiler: 2
Please verify your choices:
Compiler: Microsoft Visual C++ 6.0
Location: C:\Program Files\Microsoft Visual Studio
Are these correct?([y]/n): y
Trying to update options file: C:\Documents and Settings\Administrator\Application Data\MathWorks\MATLAB\R2007a\compopts.bat
From template: D:\MATLAB~1\bin\win32\mbuildopts\msvc60compp.bat
DllRegisterServer in D:\MATLAB~1\bin\win32\mwcommgr.dll succeeded 第二步输入:mex -setup回车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 D:\MATLAB~1\sys\lcc
[2] Microsoft Visual C++ 6.0 in C:\Program Files\Microsoft Visual Studio
[0] None
Compiler: 2
Please verify your choices:
Compiler: Microsoft Visual C++ 6.0
Location: C:\Program Files\Microsoft Visual Studio
Are these correct?([y]/n): y
Trying to update options file: C:\Documents and Settings\Administrator\Application Data\MathWorks\MATLAB\R2007a\mexopts.bat
From template: D:\MATLAB~1\bin\win32\mexopts\msvc60opts.bat
Done . . .
第三步输入:install_emd 回车,>> install_emdcemdc.c
cemdc.c(19) : fatal error C1083: Cannot open include file: 'complex.h': No such file or directory
D:\MATLAB~1\BIN\MEX.PL: Error: Compile of 'cemdc.c' failed.
D:\MATLAB~1\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.cSome 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"
>>
请问,输mbuild -setup时,有3个选项,其中有个编译器是VC++6.0,但当运行mex -setup时,就只有2个选项,没有了C++那个了,无奈选了Lcc-win32 C 2.4.1 ,最后运行install_emd,也安装完成了,就是中间出现了一大推错误,lcc preprocessor error: cemdc_fix.c:19 Could not find include file <complex.h> Compile of 'cemdc2_fix.c' failed. 不过好在emd能进行分解了,应该可以用了,但不知道安装时出现的错误是怎么回事?另外第二部为什么只有了2个选项,不见了C++那个,编译器选的不同,会不会有什么不同影响?