Method Reference: calendarDuration.repelems

calendarDuration: B = repelems (A, R)

Construct a vector of repeated elements from a calendarDuration array.

B = repelems (A, R) returns a calendarDuration vector B containing repeated elements of the input A, which must be a calendarDuration vector. R must be a 2×N matrix of integers. Entries in the first row of R correspond to the linear indexing of the elements in A to be repeated. The corresponding entries in the second row of R specify the repeat count of each element.

Source Code: calendarDuration