필터 지우기
필터 지우기

conver catagorical to juliandate

조회 수: 1 (최근 30일)
il147
il147 2022년 10월 18일
댓글: il147 2022년 10월 18일
Hi, I just want to change catagorical data to julidandate
but I can not do that process right away
so i convert to categorical to double but answer is not i expected
what's mean 66? and how can i change juliandate
Thanks!
>> time1=table2array(time1);
>> time2=double(time1);

채택된 답변

Stephen23
Stephen23 2022년 10월 18일
C = categorical({'2021-08-22','2021-08-21','2021-08-23','2021-08-22'})
C = 1×4 categorical array
2021-08-22 2021-08-21 2021-08-23 2021-08-22
double(C) % get the category indices
ans = 1×4
2 1 3 2
S = string(C) % get the category values
S = 1×4 string array
"2021-08-22" "2021-08-21" "2021-08-23" "2021-08-22"
D = datetime(S);
J = juliandate(D)
J = 1×4
1.0e+06 * 2.4594 2.4594 2.4594 2.4594
  댓글 수: 2
il147
il147 2022년 10월 18일
thanks! but I don't know why 66 come out
il147
il147 2022년 10월 18일
Oh, I did it!!!! really thank you
have a nice day!

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Satellite Mission Analysis에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by