how to use datetick?

3 ビュー (過去 30 日間)
pruth
pruth 2016 年 4 月 12 日
コメント済み: pruth 2016 年 4 月 13 日
hi,....i hve a file...first column is date and time second is data.file attached i using following code..it showing me error...i dont know why.and more over i want date tick at regular 3 month interval...not randomly...
x= vcdmean(:,1);
y = vcdmean(:,2);
plot(x,y,'.')
datetick('x', 'mmm YYYY')

採用された回答

Azzi Abdelmalek
Azzi Abdelmalek 2016 年 4 月 12 日
編集済み: Azzi Abdelmalek 2016 年 4 月 12 日
q=datevec(x)
[~,ii]=unique(q(:,1:2),'rows')
a=q(ii,:)
a=a(1:3:end,:)
xt=datenum(a)
plot(x,y,'.')
set(gca,'xtick',xt)
datetick('x', 'mmm YYYY','keepticks')
  1 件のコメント
pruth
pruth 2016 年 4 月 13 日
accepted .....thanks...

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeDates and Time についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by