matlab 呼叫mex -setup問題

裝了visual studio 2015,可是在matlab中呼叫失敗了。

>> mex -setup
Error using mex
No supported compiler or SDK was found. For options, visit



>> gnumex

會彈出一個GUI 框:

安裝圖中的選擇好目錄,最後點選Make options file,稍作等待幾分鐘,就OK了。


>> mex -setup
Warning: Legacy MEX infrastructure is provided for compatibility; it will be removed in a future
version of MATLAB. For more information, consult the MEX release notes 
Welcome to mex -setup.  This utility will help you set up  
a default compiler.  For a list of supported compilers, see 
Please choose your compiler for building MEX-files: 
Would you like mex to locate installed compilers [y]/n? y
Select a compiler: 
[1] gcc in D:\Rtools\GCC-46~1.3\bin 
[0] None 
Compiler: 1
Please verify your choices: 
Compiler: gcc  
Location: D:\Rtools\GCC-46~1.3\bin 
Are these correct [y]/n? y
Trying to update options file: C:\Users\mingzi\AppData\Roaming\MathWorks\MATLAB\R2015a\mexopts.bat 
From template:              F:\matlab\bin\win64\mexopts\GNUMEXOPTS.bat 
Done . . . 
Warning: The MATLAB C and Fortran API has changed to support MATLAB 
variables with more than 2^32-1 elements.  In the near future 
you will be required to update your code to utilize the new 
API. You can find more information about this at:  
Building with the -largeArrayDims option enables the new API.