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

    %% Create Duration Array of Fixed-Length Days
%%

% Copyright 2015 The MathWorks, Inc.

X = magic(2);
D = days(X)
%%
% Add each number of fixed-length days to the current date and time.
t = datetime('now') + D