Main Content

MATLAB Language Features Supported for C/C++ Code Generation

MATLAB Features That Code Generation Supports

Code generation from MATLAB® code supports many major language features including:

MATLAB Language Features That Code Generation Does Not Support

Code generation from MATLAB does not support the following frequently used MATLAB features (this list is not exhaustive):

  • scripts

  • GPU arrays

    MATLAB Coder™ does not support GPU arrays. However, if you have GPU Coder™, you can generate CUDA® MEX code that takes GPU array inputs.

  • calendarDuration arrays

  • Java®

  • Map containers

  • time series objects

  • tall arrays

  • try/catch statements

  • import statements

  • Function argument validation