9.246. SPREAD

9.246 SPREAD — Add a dimension to an array

Description:
Replicates a SOURCE array NCOPIES times along a specified dimension DIM.
Standard:
Fortran 95 and later
Class:
Transformational function
Syntax:
RESULT = SPREAD(SOURCE, DIM, NCOPIES)
Arguments:
SOURCE Shall be a scalar or an array of any type and a rank less than seven.
DIM Shall be a scalar of type INTEGER with a value in the range from 1 to n+1, where n equals the rank of SOURCE.
NCOPIES Shall be a scalar of type INTEGER.
Return value:
<