Main Content

addPortIdentifier

Creates a port identifier to identify port in mask

Since R2022a

Syntax

maskObj.addPortIdentifier(Name=Value)

Description

maskObj.addPortIdentifier(Name=Value) creates a port identifier to identify a particular port in the mask object.

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 port identifier, specified as a character vector. This name uniquely identifies the port identifier in the mask.

Data Types: char | string

Type of the port, specified as either Input or Output.

Data Types: string

Type of identifier, specified as name or index. Specify name if you want to identify the ports using a name, otherwise specify index, if you want to identify the ports using a port index.

Data Types: string

Port identifier appearing in the block, specified as a character vector. If the IdentifierType is index, you can specify the identifiers in one of these formats:

  • Index: The index to associate the port with the port identifier. For example, '3' associates port '3' with the port identifier.

  • Lower port index:Upper port index: The lower port index and upper port index to associate all the ports between the indices with the port identifier. For example, '2:4' associates ports 2, 3, and 4 with the port identifier.

  • List of port indices: The ports separated by comma to associate the ports with the port identifier. For example, 3,5,7. This associates the ports 3, 5, and 7 with the port identifier. Duplicates are not allowed.

  • The name of the port is specified.

Port name: String: If IdentifierType is name, this parameter is the name of the port.

Data Types: string

Examples

amaskObj.addPortIdentifier('Name','pi1',...
                           'Type','Input',...
                           'IdentifierType','index',...
                           'Identifier','2')
ans = 

  PortIdentifier with properties:

              Name: 'pi1'
              Type: 'Input'
    IdentifierType: 'index'
        Identifier: '2'
aMaskObj.addPortIdentifier('Name','pi2',...
                           'IdentifierType','name',...
                           'Identifier','common_gain')
ans = 

  PortIdentifier with properties:

              Name: 'pi2'
              Type: ''
    IdentifierType: 'name'
        Identifier: 'common_gain'

Version History

Introduced in R2022a