REPLICATE

Purpose:

Repeats a series or table.

Syntax:

REPLICATE(series, n)

series

-

A series, the input to repeat.

n

-

An integer. The number of times the input series should be repeated.

Returns:

A series with length equal to n times the original series length.

Example:

replicate{{1, 2}, 3)

 

returns the series {1, 2, 1, 2, 1, 2}.

Example:

W1: ravel(1..9, 3)

W2: rep(w1, 2)

 

W1 == {{1, 4, 7},

       {2, 5, 8},

       {3, 6, 9}}

 

W2 == {{1, 4, 7},

       {2, 5, 8},

       {3, 6, 9}

       {1, 4, 7},

       {2, 5, 8},

       {3, 6, 9}}

Remarks:

REPLICATE is a special version of CONCAT that replicates a series n times.

 

REPLICATE can be abbreviated REP.

 

See REPELEMENTS to replicate the individual elements of a series.

 

See REPCOLUMN to replicate the columns.

 

See REPMAT to replicate both rows and columns.

See Also:

CONCAT

EXTRACT

MERGE

RAVEL

REPCOLUMN

REPELEMENTS

REPMAT