www.gusucode.com > graphics 案例源码程序 matlab代码 > graphics/SpecifyDurationFormatForxAxisTickLabelsExample.m

    %% Specify Tick Label Format for _x_-Axis with Durations
% Create a line plot with duration values along the _x_-axis. Then, change
% the format of the tick labels.

t = 0:seconds(30):minutes(3);
y = rand(1,7);
plot(t,y)
xtickformat('mm:ss')