帮助中心帮助中心
您可以在生成的代码中包含变体模块、变体参数、变体转移和符号维度的替代设计。生成的代码中的变体使您能够在不同的开发阶段重用并配置代码,例如测试不同的实现或将多功能代码提供给第三方。您可以根据选择的变体控制项激活或反激活变体。有关变体控制项的详细信息,请参阅变体控制项简介。您还可以在生成的代码中控制变体控制项的外观、位置、定义和声明。
要为模型中的可变组件生成代码,请安装 Embedded Coder® 或 Simulink® Coder™。有关变体模块的代码生成的详细信息,请参阅变体系统 (Simulink Coder)。
Configure and generate code for a variant model.
Illustrates how code compile and startup variant activation time can be used together in two nested variant subsystems.
code compile
startup
您点击的链接对应于以下 MATLAB 命令:
请在 MATLAB 命令行窗口中直接输入以执行命令。Web 浏览器不支持 MATLAB 命令。
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office