Advisor.authoring.PositiveBlockTypeConstraint 类
命名空间: Advisor.authoring
超类:
创建模型顾问约束以检查受支持的模块类型
描述
Advisor.authoring.PositiveBlockTypeConstraint
类的实例定义模型只能包含的模块。
构造
constraint = Advisor.authoring.PositiveBlockTypeConstraint()
创建此类的一个实例。
属性
示例
指定受支持的模块类型
以下命令指定模型只能包含 Inport、Outport 和 Gain 模块以及具有指定封装的 Constant 模块:
c1=Advisor.authoring.PositiveBlockTypeConstraint; c1.ID='ID_1'; s1=struct('BlockType','Inport','MaskType',''); s2=struct('BlockType','Outport','MaskType',''); s3=struct('BlockType','Gain','MaskType',''); s4=struct('BlockType','Constant','MaskType','Stateflow'); c1.SupportedBlockTypes={s1;s2;s3;s4;};
版本历史记录
在 R2018a 中推出