I have this code
t=datetime(2017,1,1) + hours(1:8760);
plot(t, y);
MidleMonths = datetime(year,1:12,15);
set(gca, 'xtick', MidleMonths);
hold on
Now
I want to:
- determine the start date and end date of each month in the above year.
- Then, plot dotted lines on the start dates and end dates of the months of the above year.
- There is no magnitude (Y values) for the dotted lines (start and end dates). The dotted lines will go to infinity (up to the top of the image).
How can I do it please?
See the target figure ( this dotted lines done on PowePoint)