the way to tackle this problem is to see if the above datetime array falls between the two dates (01-Sept-2015 00:00:00 till 5-Aug-2016 00:00:00), If it does then it should be displayed. How can I create that if condition? Once i have it displayed, it would be easy for me to plot on the chart
drawing a vertical line in a plot if it is contained in the range
1 回表示 (過去 30 日間)
古いコメントを表示
I have plotted a graph with the command line:
plot(x/y)
Variable x is a datetime array from 01-Sept-2015 00:00:00 till 5-Aug-2016 00:00:00. The distance between every x-value is 1 hour.
another datetime array z is defined as:
'01-Sep-2016 03:30:00'
'05-Oct-2016 02:30:00'
'01-Sep-2016 03:30:00'
'04-Aug-2016 03:30:00'
'05-Jul-2016 03:30:00'
I want the datetime array z to be drawn as red dotted vertical line in the plot graph if it is contained in the graph.
0 件のコメント
回答 (1 件)
参考
カテゴリ
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!