Main Content

port_label

Draw port label on masked subsystem icon

Syntax

port_label('port_type', port_number, 'label')
port_label('port_type', port_number, 'label', 'texmode', 'on')

Description

port_label('port_type', port_number, 'label') draws a label on a port. Valid values for port_type include the following.

ValueDescription

input

Simulink® input port

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

Label for the reset port in a masked Resettable Subsystem.

Enable

Label for the enable port in a masked Triggered or Enabled and Triggered subsystem.

trigger

Label for the trigger port in a masked Triggered or Enabled and Triggered subsystem.

action

Label for the action port in a masked Switch Case Action Subsystem.

The input argument port_number is an integer, and label is text specifying the port's label.

Note

Physical Modeling port labels are assigned based on the nominal port location. If the masked subsystem has been rotated or flipped, for example, a port labeled using 'lconn' as the port_type may not appear on the left side of the block.

port_label('port_type', port_number, 'label', 'texmode', 'on') lets you use TeX formatting commands in label. The TeX formatting commands allow you to include symbols and Greek letters in the port label. See Interpreter for information on the TeX formatting commands that the Simulink software supports.

Note

Simulink does not support LaTex formatting commands.

Examples

The command

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

defines a as the label of input port 1.

The command

port_label('reset','R')

defines R as the label of reset port.

The command

port_label('Enable','En')

defines En as the label of Enable port.

The command

port_label('trigger','Tr')

defines Tr as the label of trigger port.

The command

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

defines Switch(): as the label of action port.

The command

port_label('trigger','\surd m','interpreter','tex')

defines the label of trigger port with TeX interpretation.

The commands

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

draw playing card symbols as the labels of the ports on a masked subsystem.

Version History

Introduced before R2006a

See Also

| |