ArrayTools
Concatenate
Array concatenation
Calling Sequence
Parameters
Description
Examples
Concatenate(dim, A1, A2, ...)
Ai
-
Matrix, Vector, or Array
dim
dimension to concatenate along
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](..).
with⁡ArrayTools:
Concatenate⁡1,Vectorrow⁡a,b,c,Vectorrow⁡d,e,f
abcdef
Concatenate⁡2,Vectorrow⁡a,b,c,Vectorrow⁡d,e,f
Concatenate⁡1,Vectorrow⁡a,b,c,Vectorrow⁡d,e,f,Array⁡1,2,3,4,5,6
abcdef123456
See Also
Download Help Document