Main Content

Author Blocks Using C/C++

Use C/C++ code within specialized APIs to create blocks

Author block algorithms with continuous or discrete states using C/C++ code:

  • If your model has multirate ports and variable-size input and output ports, use a C MEX S-Function. This workflow might require manually creating a Target Language Compiler (TLC) file for code generation.

  • If you have a simple model and you want to generate code without a TLC file, use S-Function Builder.