Filter löschen
Filter löschen

conver catagorical to juliandate

1 Ansicht (letzte 30 Tage)
il147
il147 am 18 Okt. 2022
Kommentiert: il147 am 18 Okt. 2022
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);

Akzeptierte Antwort

Stephen23
Stephen23 am 18 Okt. 2022
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 Kommentare
il147
il147 am 18 Okt. 2022
thanks! but I don't know why 66 come out
il147
il147 am 18 Okt. 2022
Oh, I did it!!!! really thank you
have a nice day!

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Satellite Mission Analysis finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by