How to convert time in nanosecond to numeric value in order to be able to compare these timeseries?

조회 수: 2 (최근 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?

채택된 답변

madhan ravi
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
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 CenterFile Exchange에서 Dates and Time에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by