convert axis label from seconds to date
3 次查看(过去 30 天)
显示 更早的评论
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 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Dates and Time 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!