Simulink Reference | ![]() ![]() |
Execute a particular phase of the simulation of a model
Syntax
Description
The model
command executes a specific phase of the simulation of a Simulink model whose name is model
. Use the command's flag
argument to indicate the phase of the simulation to be executed. See Simulating Dynamic Systems for a description of the steps that Simulink uses to simulate a model.
This command is intended to allow linear analysis and other M-file program-based tools to run a simulation step by step, gathering information about the model's states and outputs at each step. It is not intended for interactive use, for example, to debug a model.
Use this command if you want to write an M-file program that needs to examine intermediate results of a simulation. Use the sim
command if the program does not need to examine intermediate results. Use the Simulink debugger if you need to examine intermediate results to debug a model.
Arguments
Examples
This command executes the compilation phase of the vdp
model that comes with Simulink.
The following command terminates the simulation initiated in the previous example.
Note
You must always terminate simulation of the model by invoking the model command with the 'term' command. Simulink does not let you close the model until you have terminated the simulation.
|
See Also
![]() | Simulation Commands | sim | ![]() |