How to convert time in nanosecond to numeric value in order to be able to compare these timeseries?
1 次查看(过去 30 天)
显示 更早的评论
Hello,
I have the number of *.csv files that are same structure (same column number), but row numbers are different. I use readtable to upload data to matlab. I need to compare timeseries of different csv files. The example of timeseries:
'08:34:37.762296992'
'08:34:37.762450580'
'08:34:37.762450580'
'08:34:37.762460422'
'08:34:37.762460422'
'08:34:37.762472108'
'08:34:37.762472108'
'08:34:37.762543205'
'08:34:37.762543205'
'08:34:37.762673812'
How to convert this type to timeseries to numeric value in order to be able to compare them?
0 个评论
采纳的回答
madhan ravi
2018-11-15
编辑:madhan ravi
2018-11-16
T=readtable('mycsv.csv')
datetime(T{:,1},'InputFormat','HH:mm:ss.SSS') %highly recommended
11 个评论
Peter Perkins
2018-11-15
Also: these two
datenum(T{:,1})
datevec(T{:,1})
aren't really gonna work correctly, because datenums and datevecs just don't support timestamps to ns resolution.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Dates and Time 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!