| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → Simulink |
| Contents | Index |
| Learn more about Simulink |
| On this page… |
|---|
Changing a Block's Orientation |
By default, a block is oriented so that its input ports are on the left, and its output ports are on the right. You can change the orientation of a block by rotating it 90 degrees around its center or flipping it 180 degrees around its horizontal or vertical axis.
You can rotate a block 90 degrees by selecting one of these commands from the Format menu:
A rotation command effectively moves a block's ports from its sides to its top and bottom or from its top and bottom to its size, depending on the initial orientation of the block. The final positions of the block's ports depend on the block's port rotation type.
Port Rotation Type. After rotating a block clockwise, Simulink may, depending on the block, reposition the block's ports to maintain a left-to-right port numbering order for ports along the top and bottom of the block and a top-to-bottom port numbering order for ports along the left and right sides of the block. A block whose ports are reordered after a clockwise rotation is said to have a default port rotation type. This policy helps to maintain the left-right and top-down block diagram orientation convention used in control system modeling applications. All nonmasked blocks and all masked blocks by default have the default rotation policy. The following figure shows the effect of using the Rotate Block > Clockwise command on a block with the default rotation policy.

A masked block can optionally specify that its ports not be reordered after a clockwise rotation (see Port Rotation). Such a block is said to have a physical port rotation type. This policy facilitates layout of diagrams in mechanical and hydraulic systems modeling and other applications where diagrams do not have a preferred orientation. The following figure shows the effect of clockwise rotation on a block with a physical port rotation type

Simulink provides a set of commands that allow you to flip a block 180 degrees about its horizontal or vertical axis. The commands effectively move a block's input and output ports to opposite sides of the block or reverse the ordering of the ports, depending on the block's port rotation type.
A block with the default rotation type has one flip command: Format > Flip Block (Ctr+I). This command effectively moves the block's input and output ports to the side of the block opposite to the side on which they are initially located, i.e., from the left to the right side or from the top to the bottom side.

A block with a physical rotation type has two flip commands: Format > Flip Block > Left-Right or Format > Flip Block > Up-Down. The effect of these commands depends on the initial position of the ports.
Left-Right Flip. If the block's ports initially reside on the left and right sides of the block, the Left-Right command reverses the sides on which the input and ports are located. If the ports are located on the top and bottom of the block, the command reverses the order of the ports without changing their sides.

Up-Down Flip. If the block's ports reside on the top and bottom of the block, the Up-Down command reverses the sides on which the input and ports are located. If the ports are located on the left and right sides of the block, the command reverses the order of the ports without changing their sides.

To change the size of a block, select it, then drag any of its selection handles. While you hold down the mouse button, a dotted rectangle shows the new block size. When you release the mouse button, the block is resized.
For example, the following figure below shows a Signal Generator block being resized. The lower-right handle was selected and dragged to the cursor position. When the mouse button is released, the block takes its new size.
This figure shows a block being resized:

Tip Use the model editor's resize blocks commands to make one block the same size as another (see Aligning, Distributing, and Resizing Groups of Blocks Automatically). |
You can cause Simulink to display one or more of a block's parameters beneath the block. You specify the parameters to be displayed in the following ways:
By entering an attributes format string in the Attributes format string field of the block's Block Properties dialog box (see Block Properties Dialog Box)
By setting the value of the block's AttributesFormatString property to the format string, using set_param
You can add a drop shadow to a block by selecting the block, then choosing Show Drop Shadow from the Format menu. When you select a block with a drop shadow, the menu item changes to Hide Drop Shadow. The following figure shows a Subsystem block with a drop shadow:
![]()
All block names in a model must be unique and must contain at least one character. By default, block names appear below blocks whose ports are on the sides, and to the left of blocks whose ports are on the top and bottom, as the following figure shows:

Note Simulink commands interprets a forward slash, i.e., /, as a block path delimiter. For example, the path vdp/Mu designates a block named Mu in the model named vdp. Therefore, avoid using forward slashes (/) in block names to avoid causing Simulink to interpret the names as paths. |
You can edit a block name in one of these ways:
To replace the block name, click the block name, double-click or drag the cursor to select the entire name, then enter the new name.
To insert characters, click between two characters to position the insertion point, then insert text.
To replace characters, drag the mouse to select a range of text to replace, then enter the new text.
When you click the pointer anywhere else in the model or take any other action, the name is accepted or rejected. If you try to change the name of a block to a name that already exists or to a name with no characters, Simulink displays an error message.
You can modify the font used in a block name by selecting the block, then choosing the Font menu item from the Format menu. Select a font from the Set Font dialog box. This procedure also changes the font of any text that appears inside the block.
You can cancel edits to a block name by choosing Undo from the Edit menu.
You can change the location of the name of a selected block in two ways:
By dragging the block name to the opposite side of the block.
By choosing the Flip Name command from the Format menu. This command changes the location of the block name to the opposite side of the block.
For more information about block orientation, see How to Rotate a Block.
To change whether the name of a selected block is displayed, choose a menu item from the Format menu:
The Hide Name menu item hides a visible block name. When you select Hide Name, it changes to Show Name when that block is selected.
See Specifying Block Diagram Colors for information on how to set the color of a block.
![]() | Block Properties Dialog Box | Displaying Block Outputs | ![]() |

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.
| © 1984-2010- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |