Make sure that you have installed a C++ compiler that is compatible with the version of MATLAB you are using. You can check the system requirements for your version of MATLAB to ensure compatibility.
Set the environment variable “MW_MINGW64_LOC” to the location of the C++ compiler. You can do this by running the following command in the MATLAB Command Window:
” with the actual path to the C++ compiler installation directory.
Try running the ”
MEX configured to use ‘MinGW64 Compiler (C)’ for C language compilation.
To choose a different language, select one from the following:
mex -setup C++
mex -setup FORTRAN
MEX configured to use ‘MinGW64 Compiler (C++)’ for C++ language compilation.