| Contents | Index |
port_label('port_type', port_number, 'label')
port_label('port_type', port_number, 'label', 'texmode', 'on')
port_label('port_type', port_number, 'label') draws a label on a port. Valid values for port_type include the following.
| Value | Description |
|---|---|
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.
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 Mathematical Symbols, Greek Letters, and TeX Characters in the MATLAB documentation for information on the TeX formatting commands that the Simulink software supports.
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.


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 |