Mathematica 9 is now available

Array

Usage

Array[f, n]生成长度为 n,元素为 f[i]的列表
Array[f,   ,  , ...  ]生成一个元素为 f[ ,  , ... ]的嵌套列表构成的 的数组.
Array[f,   ,  , ...  ,   ,  , ...  ]生成一个列表,该列表使用的指标起点为  (缺省为1).
Array[f, dims, origin, h] 对数组的每一层使用头h,而不是列表.


Notes

• 例: Array[f, 3]LongRightArrow .
Array[f,  2, 3 ]LongRightArrow 生成一个  的矩阵.
Array[#1^#2 &,  2, 2 ]LongRightArrow .
Array[f, 3, 0]LongRightArrow 生成指标起点为0的数组.
Array[f, 3, 1, Plus]LongRightArrow .
• 注意,数组的维数不是标准Mathematica 迭代的表示形式.
•参见 Mathematica 全书: 1.8.3节2.2.6节.
• 同时参见: Table.
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]=



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.