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

    %% Convert Time of Calendar Durations to Durations
%%
% Create an array of calendar durations.

% Copyright 2015 The MathWorks, Inc.

d = caldays(8:10) + hours(1.2345)
%%
% Convert the time components of the array to durations.
t = time(d)
%%
% View the data type of |t|.
whos t