模型配置集
存储配置参数以用于多个模型或模型变体
配置集是控制模型行为的参数的命名值集。使用配置集可以:
存储模型的多组配置参数值
在不同模型配置之间快速切换
对多个模型使用同一组参数值
函数
将配置关联到模型
attachConfigSet | Associate configuration set or configuration reference with model |
attachConfigSetCopy | Copy configuration set or configuration reference and associate it with model |
detachConfigSet | Dissociate configuration set or configuration reference from model |
getActiveConfigSet | 获取模型的活动配置集或配置引用 |
getConfigSet | 从模型中获取配置集或配置引用 |
getConfigSets | Get names of all of model's configuration sets or configuration references |
getRefConfigSet | Get configuration set from configuration reference |
setActiveConfigSet | 为模型指定活动配置集或配置引用 |
Simulink.BlockDiagram.loadActiveConfigSet | Load, associate, and activate configuration set with model |
Simulink.BlockDiagram.propagateConfigSet | Propagate top model configuration reference to referenced models |
Simulink.BlockDiagram.restoreConfigSet | Restore model configuration for converted models |
Simulink.BlockDiagram.saveActiveConfigSet | Save active configuration set of model |
与参数交互
set_param | 设置 Simulink 参数值 |
get_param | 获取参数名称和值 |
configset.reference.overrideParameter | Change value of parameter in configuration reference (自 R2021a 起) |
configset.reference.hasOverriddenParameters | Determine if model configuration reference has overridden parameters (自 R2021a 起) |
configset.reference.getOverriddenParameters | Parameters that are overridden in a configuration reference (自 R2021a 起) |
configset.reference.isParameterOverridden | Determine if parameter is overridden in configuration reference of model (自 R2021a 起) |
configset.reference.restoreOverriddenParameter | Restore overridden parameter in configuration reference of model (自 R2021a 起) |
configset.reference.restoreAllOverriddenParameters | Restore all overridden parameters in configuration reference of model (自 R2021a 起) |
对象
配置
Simulink.ConfigSet | 模型配置集 |
Simulink.ConfigSetRef | Link model to freestanding configuration set |
主题
- 为模型设置模型配置参数
使用配置参数控制模型行为。
- 管理模型的配置集
为模型指定可互换的仿真配置参数集。
- 在多个模型之间共享配置
使用配置引用在多个模型之间共享配置集。
- Share a Configuration Across Referenced Models
Share the configuration set of a top model with the referenced models in the model hierarchy.
- 使用脚本自动执行模型配置
编写脚本,以编程方式将多个模型配置为使用同一配置集。
MATLAB 命令
您点击的链接对应于以下 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:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)