Put datetime scale in x-axis
古いコメントを表示
Hey there. I need to to put datetime scale in x-axis. I attached the values in a xls file.
m3=[x1,x2,x3,x4];
startDate = datenum('10-2006');
endDate = datenum('11-2099');
xdate = linspace(startDate,endDate,373); %number of months
figure
bar(xdate,m3);
dateaxis('x','mm-yyyy','keeplimlits');
legend({'X1','X2','X3','X4'},'Location','Southeast');
Till now, I only got to put the datenum and only x1 appears. When I execute the code below, it runs (exception to datetime scale).
m3=[x1,x2,x3,x4];
figure
bar(m3);
legend({'X1','X2','X3','X4'},'Location','Southeast');
Is it possible to solve it? Thanks :-)
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Dates and Time についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!