Mathematica 9 is now available
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.
Mathematica > Core Language > Expressions > Structural Operations on Expressions >

Join

Join[list1, list2, ...]
concatenates lists or other expressions that share the same head.
Join[list1, list2, ..., n]
joins the objects at level n in each of the listi.
  • Join works on SparseArray objects by effectively concatenating the corresponding ordinary lists.  »
  • Join[list1, list2, ..., n] handles ragged arrays by effectively concatenating all successive elements at level n in each of the listi. »
Join two matrices to make longer columns:
Join columns of two matrices to make longer rows:
With ragged arrays successive elements are effectively concatenated:
The second row comes from the concatenation of nothing with {3,4}:
Join depth 3 arrays at different levels:
Join expressions with any head:
Join works with SparseArray objects:
Augment a matrix by adding a row:
Augment by a column:
Make a block matrix:
This can also be done with ArrayFlatten:
Join[list1, list2, ...]is equivalent to Flatten[{list1, list2, ...}, 1]:
Successively double a list by joining to itself:
Build up the Thue-Morse sequence: [more info]:
New in 1 | Last modified in 6
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team