Logging intervals
Option to specify time intervals in which to log simulation data
Model Configuration Pane: Data Import/Export
Description
Specify time intervals during which to log data.
The logging intervals apply to:
Time
States
Output
Signal logging
To Workspace blocks
To File blocks
Data logged to the workspace using a Record block
The logging intervals do not apply to:
Final states data
Data logged using scopes
Data logged to a file using a Record block
Data in the Simulation Data Inspector
Logging intervals do not affect data displayed in the Record block or using dashboard blocks.
Dependencies
To enable this parameter, select Single simulation output.
Settings
[-inf,inf]
(default) | 2
-by-n matrixBy default, the parameter value is [-inf,inf]
, and data is logged
throughout the entire simulation.
Specify the time intervals in which to log data as a matrix with two columns. Each row contains the start and stop time for an interval in which the simulation logs simulation data. The first element is the start time for the interval, and the second element is the stop time for the interval.
The matrix must specify the logging intervals in chronological order, and the specified intervals must not overlap. The matrix must contain only real, double values and must not contain NaN
values.
When you specify an interval that includes a time before the simulation start time or after the simulation stop time, no data is logged for that interval.
Tips
The Decimation and Limit data points to last parameters also apply to logged data when you specify logging intervals.
When you change the logging intervals while stepping through a simulation using the Step Forward and Step Backward buttons, the new logging intervals do not apply until you step forward.
Software-in-the-loop (SIL) simulations support logging intervals for data returned in a
Simulink.SimulationOutput
object. In SIL simulations, specified logging intervals are ignored without warning for:Data logged using a To File block
MAT file logging (enabled with the MAT-file logging configuration parameter)
Processor-in-the-loop (PIL) simulations do not support logging intervals. Specified logging intervals are ignored without a warning message.
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: LoggingIntervals |
Type: 2 -by-n matrix that contains real, double values |
Default: [-inf,inf] |
Version History
Introduced in R2015b