datenum with time in time vector

조회 수: 1 (최근 30일)
Rica
Rica 2012년 10월 30일
Hi together!
I have a time vector: % code%%
t=[ '01:17:32'
'01:17:34'
'01:17:36'
'01:17:37'
'01:17:39'
'01:17:41'
'01:17:43'
'01:17:44'
'01:17:46'
'01:17:48'
'01:17:50'
'01:17:51'
'01:17:53'
'01:17:55'
'01:17:56'
'01:17:58'
'01:18:00'
'01:18:02'
'01:18:03'
'01:18:05'
'01:18:07'
'01:18:09'
'01:18:10'
'01:18:12'
'01:18:14'
'01:18:16'
'01:18:17'
'01:18:19'
'01:18:21'
'01:18:23'
'01:18:24'
'01:18:26'
'01:18:28'
'01:18:29'
'01:18:31']
%
end
i want to get the seriell number of this times with function DATENUM:
My code is like this:
formatIn='HH:MM:SS'
tt=datenum(t,formatIn)
i get the same seriell number. Why?
Thank you

채택된 답변

José-Luis
José-Luis 2012년 10월 30일
편집: José-Luis 2012년 10월 30일
I don't think you get the same number.
Try
diff(tt)
and you will see that they are different.
Also, use
format long
And look at your results again. The integral part is the day, which is going to be the same, the way you have your data.

추가 답변 (1개)

Rica
Rica 2012년 10월 30일
thnk you
  댓글 수: 1
José-Luis
José-Luis 2012년 10월 30일
You are welcome. Please accept an answer if it helped you.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Time Series Objects에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by