Time
Option to log time values for simulation
Model Configuration Pane: Data Import/Export
Description
Specify whether to log simulation time data to the specified MATLAB® variable during simulation.
By default, simulation results are returned as a single Simulink.SimulationOutput
object. The logging variable you specify for
time becomes a property of the SimulationOutput
object. To access the
logged time data, use dot notation. For example, when you use the default output
variable name out
and the default time logging variable name
tout
, access the time data using this
code.
tout = out.tout;
Settings
on
(default) | off
on
The software logs time data during simulation. By default, the name of the logging variable that contains the time data is
tout
. To use a different variable name, specify a valid MATLAB variable name in the text box.The variable must not have a name that matches the name of any object functions or properties of the
Simulink.SimulationOutput
object.off
The software does not log time data during simulation.
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 recommendation |
Safety precaution | No recommendation |
Programmatic Use
Parameter: SaveTime |
Value: 'on' | 'off' |
Default: 'on' |
Parameter: TimeSaveName |
Type: string | character vector |
Value: valid MATLAB variable name |
Default: 'tout' |
Version History
Introduced before R2006a