duration.vertcat
duration: C = vertcat (A, B, …)
Vertical concatenation of duration arrays.
C = vertcat (A, B, … is the equivalent of
the syntax B = [A; B; …] and vertically
concatenates the duration arrays A, B, …. All input
arrays must have the same size except along the first dimension. All of
the input arrays may also be string arrays or cell arrays of character
vectors of compatible size. Additionally, an input can be a numeric
matrix, which when parsed to the constructor will return a duration array
of compatible size.
Source Code: duration
Durations concatenate like ordinary arrays; [a; b] stacks them into one column, converting units as needed.
a = hours ([1; 2])
a =
2x1 duration array
1 hr
2 hr
b = minutes ([90; 30])
b =
2x1 duration array
90 min
30 min
[a; b]
ans =
4x1 duration array
1 hr
2 hr
1.5 hr
0.5 hr