I want to get Nx1 cell array from 1x1 cell array of datetime string. Where N is greater than 98.
Time = {datestr(now(),'mmmm dd, yyyy HH:MM:SS.FFF')};
Time =
1×1 cell array
{'January 28, 2021 12:27:15.280'}
I want to convert this as
Time=
5×1 cell array
{'January 28, 2021 17:24:47.119'}
{'January 28, 2021 17:24:47.119'}
{'January 28, 2021 17:24:47.119'}
{'January 28, 2021 17:24:47.119'}
{'January 28, 2021 17:24:47.119'}
I am doing this using
Time=[Time;Time;Time;Time;Time]
But for variable and large value of N, it is very difficult.
datetimearrays more flexible thancellarrays of strings. For more information on handling dates and times in MATLAB usingdatetime, see mathworks.com/help/matlab/…