Restricting time on graph with given time
이전 댓글 표시
Trying make a graph with given time data values for all of 2019 managed to plot the graphs but how do i restrict the graph to only plot january using the datetime function?
채택된 답변
추가 답변 (1개)
a = datetime(2021, 1, 1:365);
b = rand(size(a));
plot(a, b)
idx = find(month(a)==1);
xlim([a(idx(1)), a(idx(end))])
카테고리
도움말 센터 및 File Exchange에서 Dates and Time에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
