Main Content

Input time tolerance

Option to apply tolerance when loading external input data to account for minor discrepancies between input timestamps and simulation time

Since R2026a

Model Configuration Pane: Data Import/Export

Description

The Input time tolerance parameter specifies whether the software applies a time tolerance when loading external input data. To account for minor discrepancies between the input data timestamps and the simulation time, enable this parameter.

When you load external input data for simulation, many input data formats require that you specify both time and data values to define the input. At each time step in the simulation, the block that loads the data compares the current simulation time with the timestamps in the external input data to determine the output value to provide to the simulation.

When the software makes an exact comparison, minor discrepancies between the simulation time and the timestamps in the external input data can cause larger discrepancies in the output values. These discrepancies can lead to unexpected simulation results.

For example, both the simulation time and the time values in the external input data use the double data type. Double-precision rounding can introduce unexpected minor discrepancies that lead to unexpected simulation results.

Settings

off (default) | on

To account for minor discrepancies between external input data timestamps and the simulation time, enable this parameter.

off

The software makes an exact comparison between the input timestamps and the simulation time when loading external input data.

on

The software applies a time tolerance to the comparison between the input timestamps and the simulation time when loading external input data. The software considers the input timestamp and the simulation time equal if the timestamp is within 128*eps(t) of the simulation time t. You cannot modify the value of the time tolerance.

The time tolerance applies to all external input data loaded using any of these blocks:

This parameter does not affect how the Playback block loads external input data. The Playback block always applies a time tolerance when loading input data, using the same tolerance value 128*eps(t).

This setting is supported for production code generation except when the Language standard (Simulink Coder) parameter is set to C89/90 (ANSI).

Recommended Settings

ApplicationSetting
Debugging"on"
Traceability"on"
Efficiency"on"
Safety precaution"on"

Programmatic Use

Parameter: InputTimeTolerance
Type: string | character vector
Values: "off" | "on"
Default: "off"

Version History

Introduced in R2026a