Main Content

Stop time

Description

Specify the stop time for the simulation or generated code as a double-precision value, scaled to seconds.

Category: Solver

Settings

Default: 10

  • 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 factors such as model complexity, solver step sizes, and computer speed.

  • If your model includes blocks that depend on absolute time and you are creating a design that runs indefinitely, see Blocks That Depend on Absolute Time.

Command-Line Information

Parameter: StopTime
Type: character vector
Value: any valid value
Default: '10.0'

Related Topics