duration.isfinite
duration: TF = isfinite (D)
Return true for duration elements that are finite.
TF = isfinite (D) returns a logical array TF
of the same size as calD containing true for each
corresponding element of D that is finite and false
otherwise. Finite elements are those which are neither infinite nor
Not-A-Number.
Source Code: duration
isfinite flags the elements that are neither infinite nor NaN.
d = hours ([1, Inf, NaN, 4])
d =
1x4 duration array
1 hr Inf hr NaN hr 4 hr
isfinite (d)
ans = 1 0 0 1