Products & Services Solutions Academia Support User Community Company

Learn more about Simulink   

Simulating the Model

Overview

After you complete the model block diagram, you can simulate the system and visualize the results. This section describes how to simulate the sample model you created in the previous section, Creating a Simple Model.

Setting Simulation Options

Before simulating a model, you can set simulation options such as the start and stop time, and the type of solver that Simulink software uses to solve the model at each time step. You specify these options using the Configuration Parameters dialog box.

To specify simulation options for the sample model:

  1. Select Simulation > Configuration Parameters in the model window.

    The software displays the Configuration Parameters dialog box.

  2. Enter 20 in the Stop time field.

  3. Click OK.

    The software applies your changes to the parameters and closes the Configuration Parameters dialog box.

Running the Simulation and Observing Results

Now you are ready to simulate your example model and observe the simulation results.

To run the simulation:

  1. Select Simulation > Start in the model window.

    The software runs the model, stopping when it reaches the stop time specified in the Configuration Parameters dialog box.

      Tip   On computers running the Microsoft® Windows® operating system, you can click the Start simulation button and Stop simulation button in the model window toolbar to start and stop a simulation.

  2. Double-click the Scope block in the model window.

    The Scope window displays the simulation results.

  3. Select File > Save in the model window.

    The software saves the model.

  4. Select File > Close in the model window.

    The software closes the model.

  


Related Products & Applications

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

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