Main Content

Logging intervals


Specify time intervals during which to log data

Category: Data Import/Export



  • Specify a two-column matrix that contains real, double values that indicate the start and stop time for an interval in which you want to log data. The matrix can contain any number of rows to specify any number of logging intervals.

  • The matrix elements cannot be NaN.

  • Intervals must be disjoint and ordered. For example, you can specify these three intervals: [1,5;6,10;11,15].


  • 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.

  • Logging intervals are only supported when you select Single simulation output. The single simulation output is a Simulink.SimulationOutput object that contains all logged data that logs to the workspace.

  • 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.

  • 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 using the Simulation Stepper to step through a simulation, the new logging intervals do not apply until you step forward.

  • SIL simulation mode supports logging intervals for data that logs to a Simulink.SimulationOutput object. In SIL mode, 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)

  • PIL simulation mode does not support logging intervals. Specified logging intervals are ignored without a warning message.


To enable the Logging intervals parameter, select Single simulation output.

Programmatic Use

Parameter: LoggingIntervals
Type: two-column matrix with real, double values
Default: [-inf,inf]

Recommended Settings

DebuggingNo impact
TraceabilityNo impact

No recommendation

Safety precaution

No recommendation

See Also

Model Settings


Related Topics