# Difference between revisions of "Concat"

(→Concat(A,B,I,J,K)) |
(→Concat(A,B,I,J,K)) |
||

Line 13: | Line 13: | ||

Concat([A],[B]) | Concat([A],[B]) | ||

− | returns a 2-D array with two columns. If only two parameters are used, column index is .K. | + | returns a 2-D array with two columns. Notice that square brackets surround the variables. If only two parameters are used, column index is .K. |

When A and B are arbitrary arrays, where A has index I and B has index J, then | When A and B are arbitrary arrays, where A has index I and B has index J, then |

## Revision as of 03:52, 15 August 2010

## Contents

# Concat(A,B*,I,J,K*)

Concatenates lists or arrays.

When A and B are 1-D arrays,

Concat(A,B)

returns a list (1-D array) consisting of their elements. This form is often used to concatentate two indexes to obtain the elements for a third index.

When A and B are 1-D arrays with a common index

Concat([A],[B])

returns a 2-D array with two columns. Notice that square brackets surround the variables. If only two parameters are used, column index is .K.

When A and B are arbitrary arrays, where A has index I and B has index J, then

Concat(A,B,I,J,K)

concatenates (i.e., joins) arrays A and B, with the new result indexed by K. You must provide an index K whose length is the sum of the lengths of I and J. Often the index K is obtained using the first form of concatenate.

(new to 4.1) You can omit the K parameter:

Concat(A,B,I,J)

when you do so, the function creates a new local index named K for the result.

# Library

Array functions

# Examples

Index In1 := ['a','b','c']

Concat( In1, ['z'] ) &rarry ['a','b','c','z']

Enable comment auto-refresher