Plot 3d figure (surface) with one time-dimension axis
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hello,
I'm trying to plot: surf(d,t,v)
where:
d is a vector - consists of integer values, e.g. d=[10 11 12 .... 46]
v is an input matrix - consists of integer values, in dimension d x t
t is a vector - consists of one-minute time steps over the defined period, e.g. t= [14:33 14:34 14:35 .... 18:21]
So far, I've been able to plot the surface using some "dummy" values for y-axis (t=[1 2 3...120]). Does anybody know how to plot such surface and having the y-axis in hh:mm format? The problem is that when I'm using the dummy values, the graph contains no relevant information about time (y-axis is scaled in the integer values)
0 commentaires
Réponses (2)
Thomas
le 3 Avr 2012
For y axis having time in HH:MM format, first convert the time you have to datenum
doc datenum
Then plot the graph using the datenum value on y and to show it in the HH:MM format on the graph use datetick
doc datetick
3 commentaires
Thomas
le 3 Avr 2012
tm = {'16:34';'16:35';'16:36';'16:37';'16:38';'16:39';'16:40';'16:41';'16:42';'16:43'};
datenum(tm,'HH:MM')
Voir également
Catégories
En savoir plus sur Line Plots 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!