MATLAB: Simulation does not run in accelerator mode after switching machines

simulink

My simulation ran fine before. I recently switched machines, and now it is not working when I use accelerator mode. If I use normal mode everything works without issues, but the simulation is very slow. The error I get says:
"Problem creating accelerator MEX files caused by failed to build model using LCC in accelerator mode."

Best Answer

The cause of the issue you have encountered with accelerator mode may be that you do not have any supported compilers installed. To check the installed compilers, you can use the following commands:
>> mex -setup C
>> mex -setup C++
If these commands notify you that you do not have any supported compilers installed, I recommend using the Add-On Explorer to install the 'MATLAB Support for MinGW-win64 C/C++ Compiler'.
Once the MinGW compiler is installed, the simulation should be able to compile and run in accelerator mode.