Main Content

port_label

Display port label on masked subsystem icon

    Description

    port_label(portType,portNumber,label) displays the text as port label.

    port_label(portType,portNumber,label,texmode= IsTexMode) allows you to use TeX formatting commands in port label. The TeX formatting commands in turn allows you to include symbols and Greek letters in port label. See Interpreter for information on the TeX formatting commands supported by Simulink®.

    example

    Examples

    collapse all

    Use these commands to display the playing card symbols as the port labels on a masked subsystem.

    disp('Card\nSwapper');
    port_label('input',1,'\spadesuit','texmode','on');
    port_label('output',1,'\heartsuit','texmode','on');
    

    card symbols displayed as port labels

    Input Arguments

    collapse all

    Type of port, specified as a character vector or string.

    ValueDescription

    input

    Simulink input port

    Example: port_label('input', 1, 'a')

    output

    Simulink output port

    lconn

    Physical Modeling connection port on the left side of a masked subsystem

    rconn

    Physical Modeling connection port on the right side of a masked subsystem

    reset

    Reset port in a masked Resettable Subsystem.

    Example: port_label('reset','R')

    Enable

    Enable port in a masked Triggered or Enabled and Triggered subsystem.

    Example: port_label('Enable','En')

    trigger

    Trigger port in a masked Triggered or Enabled and Triggered subsystem.

    Example: port_label('trigger','Tr')

    The command port_label('trigger','\surd m','interpreter','tex') defines the label of trigger port with TeX interpretation.

    action

    Action port in a masked Switch Case Action Subsystem.

    Example: port_label('action','Switch():')

    Example: port_label('output',1,'xy');

    Data Types: char | string

    Port number of the masked block icon, specified as an integer.

    Example: port_label('output',1,'xy');

    Data Types: char | string

    Text displayed on the port, specified as a character vector or string.

    Example: port_label('output',1,'xy');

    Data Types: char | string

    TeX formatting mode, specified as logical value. TeX formatting commands allows you to include symbols and Greek letters as port label.

    Data Types: logical

    Version History

    Introduced in R2006a

    See Also

    | |