Main Content

getPortConstraint

Displays attributes of specified port constraint

Syntax

aMaskObj.getPortConstraint(name)

Description

aMaskObj.getPortConstraint(name) displays the attributes of the specified port constraint.

Input Arguments

expand all

Name of the port constraint, specified as a string. An error is displayed if the port constraint does not exit.

Examples

expand all

  • %Get mask object and view port constraints
    aMaskObj.getPortConstraint('pc3')
    ans = 
    
      PortConstraint with properties:
    
                       Name: 'pc3'
        ParameterConditions: [1×2 Simulink.Mask.ParameterCondition]
                       Rule: [1×1 Simulink.Mask.PortConstraintRule]
            DiagnosticLevel: 'error'
          DiagnosticMessage: 'Invalid Data'

Version History

Introduced in R2022a