How can I retrieve data from cdfepoch objects into datetime ?

1 vue (au cours des 30 derniers jours)
Tagnon Privael Okoumassoun
Tagnon Privael Okoumassoun le 13 Fév 2023
I am working on some data with the following formatting:
I am trying to plot some of the data like Column 7 over a certain time period which is the data contained in Column 2 cdfepoch object. I need some help storing the contents of column 2 into a variable as datetime elements. Thank you
  2 commentaires
chrisw23
chrisw23 le 13 Fév 2023
Have you tried this ?
Luca Ferro
Luca Ferro le 13 Fév 2023
could you share the darta file ?

Connectez-vous pour commenter.

Réponses (2)

Soniya Jain
Soniya Jain le 16 Fév 2023
Hi,
You can refer to the following documentation to create a "datetime" array:
https://in.mathworks.com/help/matlab/ref/datetime.html
You can also refer to the following documentation to plot date and time data:
https://in.mathworks.com/help/matlab/matlab_prog/plot-dates-and-durations.html

Lei Hou
Lei Hou le 24 Mar 2023
Hi,
Try this
data = cdfread('yourfile.cdf', 'DatetimeType', 'datetime');

Community Treasure Hunt

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

Start Hunting!

Translated by