%% Plot Durations and Specify Tick Format
% Define t as seven linearly spaced duration values between 0 and 3 minutes. Plot random data and specify the format of the duration tick marks using the 'DurationTickFormat' name-value pair argument.

t = 0:seconds(30):minutes(3);
y = rand(1,7);

plot(t,y,'DurationTickFormat','mm:ss')

% Copyright 2015 The MathWorks, Inc.