%% Specify Output Format of Duration Array
% Create a duration array from a matrix. The three columns specify hours, minutes, and seconds, respectively. Display the values in digital timer format showing minutes and seconds.

X = [2 3 16;1 5 59;1 45 0]
D = duration(X,'Format','mm:ss')

% Copyright 2015 The MathWorks, Inc.