Array
Array[f,n]
generates a list of length n, with elements f[i].
Array[f,n,r]
generates a list using the index origin r.
Array[f,n,{a,b}]
generates a list using n values from a to b.
Array[f,{n1,n2,…}]
generates an n1×n2×… array of nested lists, with elements f[i1,i2,…].
Array[f,{n1,n2,…},{r1,r2,…}]
generates a list using the index origins ri (default 1).
Array[f,{n1,n2,…},{{a1,b1},{a2,b2},…}]
generates a list using ni values from ai to bi.
Examples
open allclose allBasic Examples (4)
Generalizations & Extensions (2)
Applications (5)
Properties & Relations (4)
ConstantArray[c,dims] and Array[c&,dims] are equivalent:
When c is a machine number, ConstantArray is much faster for large arrays:
Array[f,dims] can be generated using Table:
Set up the Table limit specifications:
Use Apply to splice them into a Table command:
The result is identical to the array generated using Array:
SparseArray[{i_,j_}->f[i,j],dims] gives a sparse representation of Array[f,dims]:
The results are Equal:
The objects are not identical, but the represented arrays are:
Compute Array in parallel:
RelatedLinks-EIWL.png
RelatedLinks-EIWL.png
RelatedLinks-EIWL.png
RelatedLinks-EIWL.png
RelatedLinks-EIWL.png
RelatedLinks-EIWL.png
RelatedLinks-EIWL.png
RelatedLinks-EIWL.png
RelatedLinks-EIWL.png
RelatedLinks-EIWL.png