I want to represent time in time-series object in matlab in following format. dd-mmm-yyyy HH:MM:SS.FFF. I have converted my date into desired date string format but when I create time-series object then fraction value of the second is rounded off to the nearest integer, as a result I get redundant time value.
What I should do so get time series to the precision of millisecond?
I am using:
dateStr = datestr(dateNum, 'dd-ddd-yyyy HH:MM:SS.FFF')
to convert it into date string.
01-Mar-2008 18:28:51.810
But, when I use this in time-series, fractional part of the second is rounded off as shown below.
tsobject = timeseries( x, dateStr, 'name', 'X-ord')
01-Mar-2008 18:28:52
Actual date string is
01-Mar-2008 18:28:51.810
01-Mar-2008 18:29:05.646
01-Mar-2008 18:29:07.376
01-Mar-2008 18:29:09.105
01-Mar-2008 18:29:10.835
Using datenum instead of datestr
tsobject = timeseries( x, dateNum, 'name', 'X-ord')
tsobject.TimeInfo
tsdata.timemetadata
Package: tsdata
Non-Uniform Time:
Length 90419
Time Range:
Start 7.334688e+05 seconds
End 7.336596e+05 seconds
Common Properties:
Units: 'seconds'
Format: ''
StartDate: ''