FIGURE: plot monthly data and only present the years
3 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
Réponse acceptée
Azzi Abdelmalek
le 27 Nov 2012
Modifié(e) : Azzi Abdelmalek
le 27 Nov 2012
try this
dt=datenum(2002,(1:120),1)
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Annotations dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!