Skip to content
ForCADDocumentation

repelem Function

public pure function repelem(a, b) result(c)

Repeat each value according to a corresponding nonnegative count. Values retain input order. Shape mismatch or a negative count returns a zero-length array.

Arguments

Type IntentOptional Attributes Name
real(kind=rk), intent(in), contiguous :: a(:)

Values to repeat.

integer, intent(in), contiguous :: b(:)

Repetition counts with size(b)==size(a).

Return Value real(kind=rk), allocatable, (:)