Main Content

Variant Structures

Generate and manage code for structural variations in a model

With Variant Blocks in Simulink®, you can represent all design variations of a component in a single model. Each design choice is incorporated into the model as a variant choice in a single layer or a separate hierarchy. Such models have a fixed common structure and a finite set of variant choices that are activated or deactivated depending on the variant controls you select. For more information, see What Are Variants and When to Use Them. The variant activation time determines when to activate the choices and whether to include only the active choice or both active and inactive choices in the generated code. For information on activation time, see Activate Variant During Different Stages of Simulation and Code Generation Workflow.


Generate Code

Interface Variant Blocks

Maximize Code Reliability and Safety with Optimized Code

Control and Manage Variants