Simulink Data Inspector: Import CSV is dropping milliseconds from timestamps
Show older comments
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
Mark
on 14 Feb 2024
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.
Answers (1)
Jared Kizer
on 7 Feb 2023
Edited: Jared Kizer
on 9 May 2023
0 votes
Categories
Find more on Simulink 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!