Skip to Main Content Skip to Search
Product Documentation

Creating the Simple Model

Creating a New Model

Before creating a model, you need to start MATLAB and then start Simulink.

  1. In the MATLAB Command Window, enter

    simulink

    The Simulink Library Browser opens.

  2. From the Simulink Library Browser menu, select File > New > Model.

    A Simulink editor window opens with an empty model.

  3. Select File > Save as. The Save As dialog box opens.

  4. In the File name box, enter a name for your model, and then click Save. For example, enter simple_model.

    Your model is saved with the file name simple_model.mdl.

Adding Blocks to a Model

To create a model, begin by copying blocks from the Simulink Library Browser to the Simulink editor window. For a description of the blocks in this example, see Overview of a Simple Model.

  1. In the Simulink Library Browser, select the Sources library.

    The Simulink Library Browser displays blocks from the Sources library in the right pane.

  2. Select the Sine Wave block, and then drag it to the editor window.

    A copy of the Sine Wave block appears in your model.

  3. Add the following blocks to your model in the same way you added the Sine Wave block.

    LibraryBlock
    SinksScope
    ContinuousIntegrator
    Signal RoutingMux

    Your model now has the blocks you need for the simple model.

Moving Blocks in the Model

Before you connect the blocks in your model, you should arrange them logically to make the signal connections as straightforward as possible.

  1. Move the Scope block after the Mux block output. To move a block in a model, you can either:

    • Click and drag the block.

    • Select the block, and then press the arrow keys on the keyboard.

  2. Move the Sine Wave and Integrator blocks before the Mux block Inputs.

    Your model should look similar to the following figure.

Your next task is to connect the blocks together with signal lines. See Connecting Blocks in the Simple Model.

  


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