MATLAB: No MEX file gets created when calling “accelbuild” in MATLAB R2016b

accelbuildacceleratorjitmex filesmodesimulink

To develop a simulation tool for our customer, we use "accelbuild" so as to create a compiled model to accelerate simulation. In R2011b, calling "accelbuild" creates a mexw32/mexw64 file, but in R2016b, I noticed that nothing is  created. 
I would like to know if there is a way to get a compiled mexw64 file in R2016b? Is there a configuration setting that I should change to set it on?

Best Answer

As of MATLAB R2016a, the accelerator mode simulation for Simulink models uses Just-In-Time acceleration by default instead of generating accelerator mode MEX-files for the models. The reason for this is because JIT acceleration is inherently faster than running MEX-files. You can find more information on this in the following link: 
In order to be able to generate accelerator mode MEX-files for your model, you would need to switch to the classic accelerator mode. Please run the following command to do so:
set_param(0, 'GlobalUseClassicAccelMode', 'on');