Mathematica

Mathematica command ``Table''

used to create lists and arrays

Example 1


   Table[ Sqrt[j], {j, 1, 6} ]

   {1, Sqrt[2], Sqrt[3], 2, Sqrt[5], Sqrt[6]}


Example 2


   Table[ {j, N[Sqrt[j]]}, {j,1,6} ]

   {{1, 1.}, {2, 1.41421}, {3, 1.73205}, {4, 2.}, {5, 2.23607}, {6, 2.44949}}


Example 3


   Table[ a^i + b^j, {i,2,5}, {j,3,7} ]    // MatrixForm

   MatrixForm=       2    3     2    4     2    5     2    6     2    7
                    a  + b     a  + b     a  + b     a  + b     a  + b

                     3    3     3    4     3    5     3    6     3    7
                    a  + b     a  + b     a  + b     a  + b     a  + b

                     4    3     4    4     4    5     4    6     4    7
                    a  + b     a  + b     a  + b     a  + b     a  + b

                     5    3     5    4     5    5     5    6     5    7
                    a  + b     a  + b     a  + b     a  + b     a  + b
 



Index