Main Content

addParameterCondition

Creates a mask parameter condition for constraint

Since R2022a

Syntax

constraintObj.addParameterCondition(pc)
constraintObj.addParameterCondition(Name=Value)

Description

constraintObj.addParameterCondition(pc) and constraintObj.addParameterCondition(Name=Value) creates mask parameter conditions on the constraint using the name-value arguments.

Input Arguments

expand all

Name-Value Arguments

Specify optional pairs of arguments as Name1=Value1,...,NameN=ValueN, where Name is the argument name and Value is the corresponding value. Name-value arguments must appear after other arguments, but the order of the pairs does not matter.

Name of the masked parameter specified as a string.

Data Types: string

Values for the masked parameter specified as a cell array.

Data Types: cell

Examples

Create an instance of Simulink.Mask.PortConstraint.

consObj = Simulink.Mask.PortConstraint

Add the parameter condition.

consObj.addParameterCondition('Name','p1','Values',{'10','20'})
ans = 

  ParameterCondition with properties:

      Name: 'p1'
    Values: {2×1 cell}

Version History

Introduced in R2022a