Mathematica 9 is now available

Documentation / Mathematica / Built-in Functions / Lists and Matrices / List Construction /

Array

FilledSmallSquare Array[f, n] generates a list of length n, with elements f[i].

FilledSmallSquare Array[f, , , ... ] generates an array of nested lists, with elements f[, , ... ].

FilledSmallSquare Array[f, , , ... , , , ... ] generates a list using the index origins (default 1).

FilledSmallSquare Array[f, dims, origin, h] uses head h, rather than List, for each level of the array.

FilledSmallSquare Examples: Array[f, 3] LongRightArrow.

FilledSmallSquare Array[f, 2, 3] LongRightArrow generates a matrix.

FilledSmallSquare Array[#1^#2 &, 2, 2] LongRightArrow.

FilledSmallSquare Array[f, 3, 0] LongRightArrow generates an array with index origin 0.

FilledSmallSquare Array[f, 3, 1, Plus] LongRightArrow.

FilledSmallSquare Note that the dimensions given to Array are not in standard Mathematica iterator notation.

FilledSmallSquare See Section 1.8.3 and Section 2.2.6.

FilledSmallSquare See also: Table, SparseArray.

FilledSmallSquare New in Version 1; modified in 4.0.

Further Examples



Any questions about topics on this page? Click here to get an individual response.Buy NowMore Information
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.