hours
Duration in hours
Syntax
H = hours(X)
Description
H = hours(
returns an array of hours equivalent to the values inX
)X
.
If
X
is a numeric array, thenH
is aduration
array in units of hours.If
X
is aduration
array, thenH
is adouble
array with each element equal to the number of hours in the corresponding element ofX
.
Thehours
function converts betweenduration
anddouble
values. To display a duration in units of hours, set itsFormat
property to'h'
.
Examples
Input Arguments
Extended Capabilities
Introduced in R2014b
Was this topic helpful?