SPREAD
Platform  x64, Win32, .NET 
Purpose

To replicate an array by adding a dimension.

Class

Transformational function.

Syntax

FUNCTION SPREAD(SOURCE, DIM, NCOPIES)
INTEGER DIM, NCOPIES

Description

SOURCE is of any type, either an array or a scalar. The result has the same type
as SOURCE and has rank n + 1 where n is the rank of SOURCE.
DIM is a scalar integer with an value in the range 1 < DIM < n.
NCOPIES is a scalar integer giving the number of times the original array is to
be replicated.

Example

If A = [6, 2, 3] then SPREAD(A, DIM = 2, NCOPIES = 4) gives .


