%% Convert Durations to Numeric Array of Seconds
% Create a duration array.

X = hours(1) + minutes(1:4)

%
% Convert each duration in X to a number of seconds.

S = seconds(X)

% S is a double array.
%
% Find the natural logarithm of S. The log function accepts inputs of type double.

Y = log(S)

% Copyright 2015 The MathWorks, Inc.