Concatenate - Maple Help

ArrayTools

 Concatenate
 Array concatenation

 Calling Sequence Concatenate(dim, A1, A2, ...)

Parameters

 Ai - Matrix, Vector, or Array dim - dimension to concatenate along

Description

 • The Concatenate command concatenates two or more Matrices, Arrays, or Vectors along the dimension specified by dim.
 • Two or more Ai of similar size can be combined into a structure of the same or higher dimension. The Ai must have the same dimension sizes in all dimensions other than dim. If an Ai passed to Concatenate has too few dimensions, a dimension size of 1 is automatically assumed for every missing dimension.
 • Row vectors of length L are treated as 1xL Arrays, so concatenating row vectors along the first dimension creates a Matrix, while concatenating them along the second dimension creates a larger vector.
 • Scalars can be concatenated to arrays to create a longer array.  Two scalars can be concatenated to form a 2-element array.  Horizontal concatenation of scalar strings is a special case, and results in a concatenated string rather than an array of strings.
 • This function is part of the ArrayTools package, so it can be used in the short form Concatenate(..) only after executing the command with(ArrayTools).  However, it can always be accessed through the long form of the command by using ArrayTools[Concatenate](..).

Examples

 > $\mathrm{with}\left(\mathrm{ArrayTools}\right):$
 > $\mathrm{Concatenate}\left(1,{\mathrm{Vector}}_{\mathrm{row}}\left(\left[a,b,c\right]\right),{\mathrm{Vector}}_{\mathrm{row}}\left(\left[d,e,f\right]\right)\right)$
 $\left[\begin{array}{ccc}{a}& {b}& {c}\\ {d}& {e}& {f}\end{array}\right]$ (1)
 > $\mathrm{Concatenate}\left(2,{\mathrm{Vector}}_{\mathrm{row}}\left(\left[a,b,c\right]\right),{\mathrm{Vector}}_{\mathrm{row}}\left(\left[d,e,f\right]\right)\right)$
 $\left[\begin{array}{cccccc}{a}& {b}& {c}& {d}& {e}& {f}\end{array}\right]$ (2)
 > $\mathrm{Concatenate}\left(1,{\mathrm{Vector}}_{\mathrm{row}}\left(\left[a,b,c\right]\right),{\mathrm{Vector}}_{\mathrm{row}}\left(\left[d,e,f\right]\right),\mathrm{Array}\left(\left[\left[1,2,3\right],\left[4,5,6\right]\right]\right)\right)$
 $\left[\begin{array}{ccc}{a}& {b}& {c}\\ {d}& {e}& {f}\\ {1}& {2}& {3}\\ {4}& {5}& {6}\end{array}\right]$ (3)