I am using datetime to plot some time series data. I would like to add a vertical line to mark a certain date on the plot. How do I do this? Here is what I have tried.
t = datetime(2014,6,28) + calweeks(0:9);
y = rand(1,10);
plot(t,y);
hold on;
tMark = datetime(2014,8,1);
plot([1 1]*tMark, get(gca, 'ylim'));
This returns the error "Undefined operator '*' for input arguments of type 'datetime'. ".
댓글 수: 0
댓글을 달려면 로그인하십시오.