Skip to Main Content Skip to Search
Product Documentation

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

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

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 Mathematical Symbols, Greek Letters, and TeX Characters in the MATLAB documentation 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 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.

See Also

disp | fprintf | text

  


Related Products & Applications

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.

 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS