Skip to Main Content Skip to Search
Product Documentation

About Variant Systems

The Embedded Coder software generates code from a Simulink model containing one or more Model Variants blocks or Variant Subsystem blocks. To learn how to create a model containing variant blocks, see Modeling Variant Systems in the Simulink documentation.

By default, the Simulink Coder software generates code for the active variant. The Embedded Coder software can generate code for only the active variant or for all variants. Code generated for all variants is surrounded by C preprocessor conditionals, #if, #elif, and #endif. Therefore, the active variant is selected at C compile time and the preprocessor conditionals determine which sections of the code to execute.

  


Related Products & Applications

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.

 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS