Convert timestamps in CSV file to seconds using readtable and table2timetable
Show older comments
Hello,
I found several solutions for converting timestamps to seconds (by eliminating year, month, day...), but none of them worked. How can I use readtable() and table2timetable() for converting the timestamps in my CSV file to seconds? Attached you can find the CSV file. My goal is to plot gX, gY, gZ in terms of time. What is the most efficient way of applying that?
Thanks
2 Comments
First you need to create the input file with sufficient precision to differentiate between samples (or eliminate the repeated timestamps in some fashion).
After you do that, I suspect you'll have better luck using the timeseries object than the datetime or timetable to use linear time instead of calendar time for plotting as the duration time object is hamstrung for less than seconds intervals it appears.
Or, just revert to the old datenum and treat the absicssa as purely numeric and fixup the axes using the datetimeruler manually.
YH
on 11 Mar 2018
Accepted Answer
More Answers (0)
Categories
Find more on Printing and Saving 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!