Plotting only the year of a column vector with full date
5 次查看(过去 30 天)
显示 更早的评论
I have a column vector with the dates in the format "MM/dd/yyyy." I would like to plot this against another vector, but only using the year part of the date. How can I extract the yyyy part and assign it to a new vector variable to be able to plot it?
2 个评论
Rik
2020-10-21
Do you have tyhe dates as a datetime vector, as a string vector, or as a cell vector of chars? And what did you try already?
采纳的回答
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Line Plots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!