Accelerating the pace of engineering and science

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

output

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

Enable

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

trigger

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

action

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

The input argument port_number is an integer, and label is a string 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.

Examples

The command

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


defines a as the label of input port 1.

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','$\sqrt m$','interp','latex')


defines the label of trigger port with latex interpretation.

The commands

disp('Card\nSwapper');