필터 지우기
필터 지우기

I have IgorTime data in which time:units = "seconds since 1904-01-01". I would like to convert this seconds to datevc.

조회 수: 10 (최근 30일)
I have attached the file (IgorTime).
Thank you

채택된 답변

Walter Roberson
Walter Roberson 2019년 6월 18일
datetime(T/86400,'convertfrom','excel1904')

추가 답변 (1개)

Are Mjaavatten
Are Mjaavatten 2019년 6월 17일
First: Are you sure your T vector is in seconds? If so, your time list covers about 48 milliseconds around 01-Jan-1904 11:41:29. It makes more sense if T is in days since 1904-01-01.
Anyway, here is a way to do it:
dt = datetime(1904,1,1) + T; % Use T/24/3600 if T is really in seconds
dv = datevec(dt);
I recommend to work with datetime objects, which are very flexible. For instance, the time axis adustst automatically when you zoom in plots.
  댓글 수: 1
Vishnu Dhakad
Vishnu Dhakad 2019년 6월 18일
I am sorry for wrong information.
By Mistake, I have uploaded the wrong file.
Now I am upload the correct file please find the attachment.
Thank you for your valuable answer but I used following code and it is working.
T = T./86400;
dt = datetime(T+1904*365.24264707,'ConvertFrom','datenum')
I will also try your code
Thank you again

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

카테고리

Help CenterFile Exchange에서 MATLAB에 대해 자세히 알아보기

태그

제품


릴리스

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by