MatLab之Simulink之simple model

  

  Use Simulink to model a system and then simulate the dynamic behavior of that system.

    

1  Open

  in Command Window, type simulink, open Simulink Library Browser

2  Create model

  File -> New -> Model, and then save it.

3  Add blocks

  add following blocks from Simulink Library Brower (Ctrl + I)

  • Sine Wave — Generates an input signal for the model

  • Integrator — Processes the input signal

  • Bus Creator — Combines the input signal and processed signal into one signal

  • Scope — Visualizes the signals

4  Connection

  connect them with lines, Ctrl + click is useful when connecting widely separated blocks or when working with complex models

5  Simulation parameters

  Simulation -> Model Configuration Parameters, then Solver -> Stop time(20), Solver -> max step size(0.2)

    

6  Run and observe

  Simulation -> Run, afte simulation we can view results by double-click the Scope block.

  In Scope toolbar, click Parameters button . Select the Style tab and edit figure parameters properties.

  

原文地址:https://www.cnblogs.com/mengdie/p/4578637.html