convert axis label from seconds to date
3 views (last 30 days)
Show older comments
I'm plotting data based on samples every second. For example I have a plot over 5 days (5 days equals 5*24*60*60 = 432000 seconds) and therefore 432000 values. I don't have an explicit time vector, so I'm plotting the data using the command plot(y_data). So the x axis shows the indices, which represents the time stamp in seconds as well.
What I'm struggling with now is to convert the x axis to a date format. I want it to be something like 'Monday 19:25' or maybe 'Monday 3rd April 2009' or whatever date format datestr supports.
I wasn't able to figure out a way how to do that.
Thanks for your help!
0 Comments
Answers (0)
See Also
Categories
Find more on Dates and Time 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!