Simulink Data Inspector exports some signals with different time vector
Show older comments
This issue is with Matlab 2022b
I am using Simulink Real-time with a SpeedGoat HiL system, when we are running the model in real-time and viewing the logged data in Simulink Data Inspector (SDI), all signals are correctly using the same time/x-axis. We are usually starting/stopping logs, so the test run rarely starts at 0seconds.
However, when we export the data (to mat file) and reload into a new instance of Matlab (ie on another laptop), we notice that for a few signals, the time vector starts at zero, see screenshot below:

The signal on the right hand side, is the correct time axis, and most other signals use this - but for the signal on the left, the time vector is reset to zero.
I have checked the signal properties in the model and the both look the same.
If anyone could help with this issue it would be most appreciated.
Answers (1)
Isha
on 15 Jun 2026
0 votes
Hello,
This behavior is expected and is related to how the Simulation Data Inspector (SDI) stores and exports signal data, rather than an issue with the model itself.
In SDI, all signals appear aligned on a common time axis because SDI automatically synchronizes signals during visualization using internal run metadata. This alignment happens only for display purposes and ensures that signals from the same run appear correctly correlated on the plot.
However, when exporting data to a MAT file and loading it in a new MATLAB session, this visualization alignment is not preserved. According to the official MathWorks documentation, when exporting SDI data, a single signal is stored as a timeseries object, and multiple signals or runs are stored as a Simulink.SimulationData.Dataset. Each signal retains its own independent time vector in the exported data. (Export Data From Simulation Data Inspector to Workspace or File) [mathworks.com]
Because each signal is stored independently, there is no enforced global time base after export. As a result, some signals may have a time vector that starts at zero if they were originally logged with relative time, while others retain the absolute simulation time if they were logged that way.
This difference typically occurs when signals are logged via different mechanisms, such as a mix of streaming, file logging, or signals derived from subsystems. Even though SDI aligns these signals correctly for visualization, the exported MAT file preserves the raw time values without applying any alignment.
In summary, the discrepancy arises because SDI performs automatic time synchronization only during visualization, while MAT file export preserves the original time vector of each signal independently. This is expected behavior and does not indicate any inconsistency in the model configuration.
Hope this helps.
Categories
Find more on Real-Time Signal Logging and Streaming in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!