Array
Usage
• Array[f, n]生成长度为 n,元素为 f[i]的列表
• Array[f,  , , ... ]生成一个元素为 f[ , , ... ]的嵌套列表构成的  的数组.
• Array[f, dims, origin, h] 对数组的每一层使用头h,而不是列表.
Notes
• 例: Array[f, 3]  . • Array[f, 3, 0]  生成指标起点为0的数组. • Array[f, 3, 1, Plus]  . • 注意,数组的维数不是标准Mathematica 迭代的表示形式.
Further Examples
This creates an array of elements.
In[1]:=
|
Out[1]=
|
This creates an array of elements with elements each.
In[2]:=
|
Out[2]=
|
This array starts its index at .
In[3]:=
|
Out[3]=
|
Since the function Plus is specified here, the head of the array changes to Plus from its default value List.
In[4]:=
|
Out[4]=
|
This array uses the index origins and .
In[5]:=
|
Out[5]=
|
|