The output of "mex -setup -v" should show the paths and registry settings MATLAB checks to find supported compilers.
The part of the output between "... Looking for compiler 'Microsoft Visual C++ 2013 Professional' ..." and "Did not find installed compiler 'Microsoft Visual C++ 2013 Professional'." should reveal why MATLAB is not detecting the VS2013 Compiler.
If this part is missing, then MATLAB may not be searching for the Visual Studio 2013 C++ Compiler.
Check that "msvc2013.xml" and "msvcpp2013.xml" exist in "MATLABROOT\bin\win64\mexopts" and that these files can be read by MATLAB:
f1 = fopen(fullfile(matlabroot, 'bin', 'win64', 'mexopts', 'msvcpp2013.xml'));
f2 = fopen(fullfile(matlabroot, 'bin', 'win64', 'mexopts', 'msvc2013.xml'));
l1 = textscan(f1, '%s', 1, 'delimiter', '\n', 'headerlines',2);
l2 = textscan(f2, '%s', 1, 'delimiter', '\n', 'headerlines',2);
l1{:}
l2{:}
If these files are missing, a re-install should restore them. If these files exist but cannot be accessed, check that MATLAB is running with administrative privileges.
Best Answer