Stop time
Simulation stop time
Model Configuration Pane: Solver
Description
Specify the stop time for the simulation or generated code in seconds, as a double-precision value.
Settings
Default: 10
The stop time must be greater than or equal to the start time.
Specify
inf
to run a simulation or generated program until you explicitly pause or stop it.If the stop time is the same as the start time, the simulation or generated program runs for one step.
Simulation time is not the same as clock time. For example, running a simulation for 10 seconds usually does not take 10 seconds. Total simulation time depends on many factors, such as model complexity, solver step size, and system speed.
If your model includes blocks that depend on absolute time and your design runs indefinitely, see Blocks That Depend on Absolute Time.
Examples
Recommended Settings
The table summarizes recommended values for this parameter based on considerations related to code generation.
Application | Setting |
---|---|
Debugging | No impact |
Traceability | No impact |
Efficiency | No impact |
Safety precaution | A positive value |
Programmatic Use
Parameter: StopTime |
Type: string | character vector |
Values: double |
Default: '10.0' |
Version History
Introduced before R2006a