Combine year and day into single date vector to plot against measurements
1 view (last 30 days)
Show older comments
Brenton Hirao
on 6 Oct 2019
Edited: Brenton Hirao
on 7 Oct 2019
I have a data set that looks like:
1991 46.000000 -5.08
1991 46.006944 -5.08
1991 46.013889 -5.09
1991 46.020833 -5.09
1991 46.027778 -5.09
1991 46.034722 -5.09
In the format of: year, days since Jan 1 of that year, and a measurement. The whole data set spans several years.
How can I combine both the year and number of days into a date string (or serial date number) that I can continuously plot against the measurements?
Thanks for any help.
1 Comment
the cyclist
on 6 Oct 2019
How are those data stored now? Are they just in a numeric array?
Can you upload the data here (using the paper clip icon), so that we don't have to recreate it?
Are you ok with the output being in a datetime object? That is arguably the best way to store dates in recent versions of MATLAB.
Accepted Answer
More Answers (0)
See Also
Categories
Find more on 2-D and 3-D Plots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!