Simulink Editor

Editor Layout

Opening a Simulink® model or library displays the model or library in the Simulink Editor. For more information, see Open the Simulink Editor.

The Simulink Editor has the following major sections:

  • Title bar

    In the top left corner, the title bar displays the name of the model or subsystem that is open in the model window.

  • Menu bar and toolbar

    At the top of the Simulink Editor, you can access commands to work with models. Several buttons in the toolbar provide quick access to commonly used Simulink Editor menu options. Other buttons in the toolbar open other Simulink tools, such as the Model Explorer (for details, see Open Simulink Tools from the Toolbar).

  • Palette

    The icons in the vertical bar on the right side of the Simulink Editor perform very common tasks, such as adding an annotation.

  • Explorer bar

    The breadcrumb shows the systems that you have open in the editor. Select a system in the breadcrumb to open that system in the model window. If you click in the Explorer bar whitespace, you can edit the hierarchy. Also, the down arrow at the right side of the Explorer bar provides a history.

  • Model Browser

    Click the double arrows in the bottom left corner of the Simulink Editor to open or close a tree-structured view of the model in the editor.

  • Canvas — The canvas is the area where you edit the block diagram. You can use the mouse and keyboard to create and connect blocks, select and move blocks, edit block labels, display block dialog boxes, and so on.

    To display context menus specific to a particular model object in the canvas, such as a block, right-click the object.

  • Status information — Near the top of the editor, you can see (and reset) the simulation time and the simulation mode. The bottom status bar shows the status of Simulink processing, the zoom factor, and the solver. In addition, when you update, simulate, or build a model, the bottom status bar displays the total number of diagnostics generated. Simulink does not bring the Diagnostic Viewer into focus so that you can continue developing your model. When you are ready to diagnose warnings or view information, click the link displayed in the status bar to bring the Diagnostic Viewer into focus.

Open Simulink Tools from the Toolbar

The Simulink Editor toolbar provides several buttons for quick access to other Simulink tools.

For buttons that have associated menu options, clicking the button invokes the first menu option.

ToolsButtons and Associated Menus

Library Browser

Model Explorer

Simulation Stepper

Next Step

Previous Step

Simulation Data Inspector

Advisor Tools

Undoing Commands

You can cancel the effects of up to 101 consecutive operations. To undo commands, select Edit > Undo. Repeat until you get to the command that you want to undo. You can undo operations such as:

  • Adding, deleting, or moving a block

  • Adding, deleting, or moving a line

  • Adding, deleting, or moving a model annotation

  • Editing a block name

  • Creating a subsystem

To reverse the effects of an Undo command, select Edit > Redo.

Window Management

One Simulink Editor Per Model

When you open a model, that model appears in its own Simulink Editor window. For example, if you have one model already open, and then you open a second model, the second model appears in a second Simulink Editor.

To open the same model in two separate Simulink Editor windows, at the MATLAB® command prompt, enter the open_system command, using the window argument. For example, if you already have the vdp model open, then to open another instance of the vdp model in a separate Simulink Editor, enter:

open_system ('vdp', 'window')

Open a Subsystem

The Simulink Editor displays only one active window at a time. By default, if you open a Subsystem block, the opened subsystem replaces (in terms of being displayed in the model window) the model from which you opened the subsystem.

You can use tabs in the Simulink Editor to make it easier to navigate between model windows for the top model and subsystems. To open a subsystem in a separate tab:

  1. Right-click the Subsystem block.

  2. From the context-menu, select Open In New Tab. In the example below, there are separate tabs for the ex_sscreate2 model and for the Subsystem.

Navigate between the top model and subsystems by clicking the appropriate tab. Or, choose an option following options from the View > Navigate menu, such as Back, Back to Parent, or Previous Tab.

For more information about opening subsystems, see Open a Subsystem.

To rearrange the order of tabs within a Simulink Editor window:

  1. Select the tab that you want to move.

  2. Drag the tab to where you want it to appear.

  3. Release the mouse button.

Open a Referenced Model

If you open a Model block, the referenced model opens in a separate Simulink Editor.

Bring the MATLAB Desktop Forward

Simulink Editor windows open on top of the MATLAB desktop. To bring the MATLAB desktop back to the top of your screen, in the Simulink Editor, select View > MATLAB Desktop.

Was this topic helpful?