Main Content



为维度、子系统、变体模型以及包含 Variant Sink 和 Variant Source 模块的模型生成代码。



Represent Subsystem and Variant Models in Generated Code

Create a model with subsystem or variant models. Generate code that contains preprocessor conditionals that control the activation of each variant choice.

Implement Dimension Variants for Array Sizes in Generated Code

Specify dimension information as symbols in blocks and data objects. These symbols propagate throughout the model during simulation and then go into the generated code.

Compile Code Conditionally for all Values of Variant Parameters

This example shows how to generate a C code that contains all the active and inactive values of variant parameters.

Represent Variant Source and Sink Blocks in Generated Code

Generate code that contains preprocessor conditionals that control the activation of each variant choice and allow for no active variant choice.

Represent Variant Condition Values of Enumerated Type in Generated Code

Generate C code from Simulink® models having variant condition values of enumerated type.

Configure Dimension Variants for S-Function Blocks

Configure S-functions to support forward propagation, backward propagation, or forward and backward propagation of symbolic dimensions during simulation.

Code Generation for Variant Blocks

Generate code containing preprocessor conditionals that control the active variant choice for a Simulink model containing variant blocks.

Generate Preprocessor Conditionals for Variant Systems

Define variant control variables and configure model for generating preprocessor conditional directives.

Generate Code for Variant Subsystem with Child Subsystems of Different Output Signal Dimensions

This example shows how to use symbolic dimensions to generate code for a variant subsystem consisting of child subsystems of different output signal dimensions.

使用变体模型生成使用 C 预处理器条件句的代码