Plot 3d figure (surface) with one time-dimension axis
2 次查看(过去 30 天)
显示 更早的评论
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 个评论
回答(2 个)
Thomas
2012-4-3
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 个评论
Thomas
2012-4-3
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')
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Annotations 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!