Hi,
Code Generation from Simulink Models with GPU Coder should provide a proper understanding and detailed steps on how to generate optimised CUDA code from Simulink models using GPU Coder. Also, I suppose, you are using R2016b version of MATLAB. GPU Coder has been launched from R2017b onwards. However, there may be some bug fixes in the later versions which can be found in Release Notes. So it is recommended to update the MATLAB to a newer version.
