time
Convert time of calendar duration to duration
Syntax
Description
Examples
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 t
.
whos t
Name Size Bytes Class Attributes t 1x3 40 duration
Input Arguments
d
— Input calendar duration
scalar | vector | matrix | multidimensional array
Input calendar duration, specified as a scalar, vector, matrix,
or multidimensional calendarDuration
array.
Extended Capabilities
Tall Arrays
Calculate with arrays that have more rows than fit in memory.
The
time
function fully supports tall arrays. For more information,
see Tall Arrays.
Thread-Based Environment
Run code in the background using MATLAB® backgroundPool
or accelerate code with Parallel Computing Toolbox™ ThreadPool
.
Distributed Arrays
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).
Version History
Introduced in R2014b
MATLAB-Befehl
Sie haben auf einen Link geklickt, der diesem MATLAB-Befehl entspricht:
Führen Sie den Befehl durch Eingabe in das MATLAB-Befehlsfenster aus. Webbrowser unterstützen keine MATLAB-Befehle.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)