How to label the x-axis of a time series with the years?
Show older comments
I have a time series that gives data every hour from 1979 January 1st 00:00 am to 2021 March 11th 22:00 pm. So, I have a time series that has 369886 elements in total and it's a row vector. For example, use x= rand(369886,1). How do you show the years on the x axis (using xlabel)?
(i.e, 1979,1980,...,2021 on the x axis taking into account the leap years etc)
I'd highly appreciate an example if it's possible
Accepted Answer
More Answers (0)
Categories
Find more on Logical 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!