MATLAB: Creating a mesh plot with data in a timetable

meshplotting

Hi there,
Assume that I create a time table based on a matrix as follows.
X = rand(5,3);
Time = seconds(1:5);
TT = array2timetable(X,'RowTimes',Time)
Now I want to get a meshz plot with x axis to be the Time vector and and showing dateticks as xtick labels.
I tried
meshz(TT{:,:})
but this will show xticks NOT as dateticks as in Time ?
Can anyone please help me with this ?
Thank you.

Best Answer

OK, the above conversation branched another route --
time=datenum(Time); % convert to datenum since they're doubles underneath...
meshz(time,Y,Z)
xt=xticks; xticks(xt(1:3:end)) % not going to be room for very many tick labels so cut 'em down...
datetick('x','mmmyy HHAM','keepticks','keeplimits')
results in