Main Content

Limit data points to last


Log only the last n data points for outputs and states.

Category: Data Import/Export


Default: Off, 1000


Limits the number of data points logged to the workspace to the specified number. This setting only applies to output and states logging.

Specify the maximum number of data points to log to the workspace. At the end of the simulation, the workspace contains the last n points generated by the simulation.


Does not limit the number of data points logged to the workspace for outputs and states.


  • For some models and simulation conditions, logging can produce large amounts of data. Use this parameter to limit the number of samples saved when you only need to analyze data from the end of the simulation.

  • You can also apply a Decimation factor to reduce the number of samples saved for outputs and states.

  • For more information about configuring which data points are logged for different logging techniques, see Specify Signal Values to Log.

Programmatic Use

Parameter: LimitDataPoints
Value: 'on' | 'off'
Default: 'off'
Parameter: MaxDataPoints
Type: character vector
Value: positive integer greater than zero
Default: '1000'

Recommended Settings

DebuggingNo impact
TraceabilityNo impact
EfficiencyNo recommendation
Safety precautionNo recommendation

Related Topics