Simulink Data Inspector: Import CSV is dropping milliseconds from timestamps

I am importing a csv with a series of column values timestamped on column one. Format is like below (data is just an example):
Time, var1, var2, var3
2023-01-31 14:26:50.000, 0.5, 0.1, 2
2023-01-31 14:26:50.100, 0.55, 0.12, 1.8
2023-01-31 14:26:50.200, 0.54, 0.11, 1.9
... etc
When I import the csv via the SDI gui, the milliseconds field is dropped. All 10 data points (one for each tenth of a second) are placed on top of each other resulting in traces that appear like so:
This is all ten data points placed on each whole second interval.
Simulink seems to be dropping all millisecond data after the decimal. Can I manually specify the datetime string format to be used when importing the csv? How else might I format the data so that millisecond data is properly imported?

1 Comment

Could you post on how you imported raw data into the SDI? I am getting errors trying to import from data in a .mat file that WASN'T created by a Simulink run.

Sign in to comment.

Answers (1)

I found a workaround by reformatting my Time variable to be a T+ counter formatted in seconds only (SSS.sss). For my application, I don't necessarily need a datetime format.

Categories

Find more on Simulink in Help Center and File Exchange

Products

Release

R2022b

Asked:

on 2 Feb 2023

Commented:

on 14 Feb 2024

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!