Table
Table[expr, {imax}] generates a list of imax copies of expr.
Table[expr, {i, imax}] generates a list of the values of expr when i runs from 1 to imax.
Table[expr, {i, imin, imax}] starts with i = imin.
Table[expr, {i, imin, imax, di}] uses steps di.
Table[expr, {i, imin, imax}, {j, jmin, jmax}, ... ] gives a nested list. The list associated with i is outermost.
Examples: Table[f[i], {i, 4}] .
Table[i - j, {i, 2}, {j, 2}] .
You can use Table to build up vectors and matrices.
See also: DiagonalMatrix, IdentityMatrix, NProduct, NSum.
Examples
Using InstantCalculators
Here are the InstantCalculators for the Table function. Enter the parameters for your calculation and click Calculate to see the result.
In[1]:=
Out[1]=
In[2]:=
Out[2]=
In[3]:=
Out[3]=
In[4]:=
Out[4]=
In[5]:=
Out[5]=
Entering Commands Directly
You can paste a template for this command via the Text Input button on the Table Function Controller.
Here are the squares of the first 10 integers.
In[6]:=
Out[6]=
This gives the cubes of the integers from -3 to 3.
In[7]:=
Out[7]=
Here is Pascal's triangle using nested lists with the inner iterator j dependent upon the outer iterator i.
In[8]:=
Out[8]=
|