解决办法:
1、确认安装有VC
2、如果安装有VC,在出现
Please choose your compiler for building external interface (MEX) files:
Would you like mex to locate installed compilers [y]/n?
的时候输入n
3、此时会列出matlab支持的编译器
[1] Intel C++ 9.1 (with Microsoft Visual C++ 2005 SP1 linker)
[2] Intel Visual Fortran 10.1 (with Microsoft Visual C++ 2005 SP1 linker)
[3] Intel Visual Fortran 9.1 (with Microsoft Visual C++ 2005 SP1 linker)
[4] Lcc-win32 C 2.4.1
[5] Microsoft Visual C++ 6.0
[6] Microsoft Visual C++ .NET 2003
[7] Microsoft Visual C++ 2005 SP1
[8] Microsoft Visual C++ 2008 Express
[9] Microsoft Visual C++ 2008 SP1
[10] Open WATCOM C++
[0] None
选择安装的VC版本(我装的是VS2005)
5、选择完成之后,会要求指定VC的安装目录
The default location for Microsoft Visual C++ 2005 SP1 compilers is C:\Program Files\Microsoft Visual Studio 8,
but that directory does not exist on this machine.