FIGURE: plot monthly data and only present the years
조회 수: 3 (최근 30일)
이전 댓글 표시
Hi I'm trying to plot monthly data and only present the years on the x-axis. Is this method correct?
startdate = datenum('31-01-2002','dd-mm-yyyy')
enddate = datenum('31-12-2010','dd-mm-yyyy')
dt = linspace(startdate,enddate,108);
data = rand(numel(dt),1);
plot(dt,data)
datetick('x','yyyy','keepticks')
댓글 수: 2
채택된 답변
Azzi Abdelmalek
2012년 11월 27일
편집: Azzi Abdelmalek
2012년 11월 27일
try this
dt=datenum(2002,(1:120),1)
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Annotations에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!