Skip to Main Content Skip to Search
Product Documentation

Simulating the Simple Model

Setting Simulation Options

Before you simulate a model, you have to set simulation options. Specify options, such as the stop time and solver, using the Configuration Parameters dialog box. For how to build the model in this example, see Creating the Simple Model.

  1. In the Simulink editor window, select Simulation > Configuration Parameters. The Configuration Parameters dialog box opens to the Solver pane.

  2. In the Stop time field, enter 20, and in the Max step size field, enter 0.2.

  3. Click OK.

    The software updates the parameter values with your changes and closes the Configuration Parameters dialog box.

Running a Simulation and Observing Results

After entering your configuration parameter changes, you are ready to simulate the simple model and visualize the simulation results.

  1. In the Simulink editor window, select Simulation > Start from the menu.

    The simulation runs, and then stops when it reaches the stop time specified in the Configuration Parameters dialog box.

      Tip   Alternatively, you can control a simulation by clicking the Start simulation button and Stop simulation button on the editor window toolbar.

  2. Double-click the Scope block.

    The Scope window opens and displays the simulation results. The plot shows a sine wave signal with the resulting cosine wave signal from the Integrator block.

  3. From the toolbar, click the Parameters button , and then the Style tab. The Scope Parameters dialog box displays the figure editing commands.

  4. Make changes to the appearance of the figure. For example, select white for the Figure and Axes background color, and change the signal line colors to blue and green. Click the Apply button to see your changes.

  5. Select File > Close.

    The Simulink editor window closes with changes to your model and the configuration parameters.

  


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