Convert time of calendar duration to duration
Convert Time of Calendar Durations to Durations
Create an array of calendar durations.
d = caldays(8:10) + hours(1.2345)
d = 1x3 calendarDuration 8d 1h 14m 4.2s 9d 1h 14m 4.2s 10d 1h 14m 4.2s
Convert the time components of the array to durations.
t = time(d)
t = 1x3 duration 01:14:04 01:14:04 01:14:04
View the data type of
Name Size Bytes Class Attributes t 1x3 40 duration
d — Input calendar duration
scalar | vector | matrix | multidimensional array
Input calendar duration, specified as a scalar, vector, matrix,
Calculate with arrays that have more rows than fit in memory.
This function fully supports tall arrays. For more information, see Tall Arrays.
Run code in the background using MATLAB®
backgroundPool or accelerate code with Parallel Computing Toolbox™
Partition large arrays across the combined memory of your cluster using Parallel Computing Toolbox™.
This function fully supports distributed arrays. For more information, see Run MATLAB Functions with Distributed Arrays (Parallel Computing Toolbox).
Introduced in R2014b