Run Individual Simulations
Run and control individual simulations directly from the Simulink® Editor or programmatically from the MATLAB® command prompt
Simulating a model gives you results of the algorithms that you build through the process of modeling. You can interact with the simulations by pacing the simulation, tuning model parameters, stopping or pausing the simulation, and displaying port values to evaluate the design of your model. Simulations help you understand the design and behavior of your model.
Simulate a model interactively by clicking the Run button in the Simulink Toolstrip, or programmatically using functions like sim
and set_param
in the MATLAB Command Window or a MATLAB script.
For information about running parallel and batch simulations, see Run Multiple Simulations.
Funktionen
Objekte
Simulink.SimulationInput | Creates SimulationInput objects to make changes to model for
multiple or individual simulations |
Simulink.SimulationOutput | Access simulation outputs and metadata |
Simulink.SimulationMetadata | Access metadata of simulation runs |
Simulink.op.ModelOperatingPoint | Complete information that represents model operating point in simulation |
Modelleinstellungen
Initial state | Option to specify initial model state or operating point for simulation |
Final states | Option to log final state values |
Save final operating point | Option to save complete model operating point when simulation is paused or stopped |
Input | Option to load external input data for simulation using top-level input ports |
Themen
Run Basic Simulations
- Simulation Phases in Dynamic Systems
Discover how the Simulink software simulates a dynamic system. - Choosing a Simulation Mode
Based on your simulation needs, choose to run your simulation in normal, accelerator, or rapid accelerator mode. - Simulate a Model Interactively
Start, suspend, and stop a simulation interactively. - Run Simulations Programmatically
Programmatically simulate a model using thesim
function. - Use Model Operating Point for Faster Simulation Workflow
Reduce the time required to run a set of simulations by simulating from an initial operating point.
Analyze Simulations
- Simulation Pacing
Specify a pace to slow down simulations. - How Stepping Through Simulation Works
Learn how simulation snapshots work. - Debug Simulation Using Signal Breakpoints
Set breakpoints to pause simulation at points of interest then step through simulation block by block. - Display Port Values for Debugging
Display the values of block outputs on the block diagram during simulation. - Operating Point Behavior
Considerations for using operating point with S-functions and modifying models you want to simulate from an initial operating point.
Perform Iterative Simulations With Fast Restart
- How Fast Restart Improves Iterative Simulations
Learn when to use fast restart for speeding up simulation. - Get Started with Fast Restart
Configures your model to prepare for fast restart simulation.