This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.

# ConstantArray

 ConstantArray generates a list of n copies of the element c. ConstantArraygenerates an array of nested lists containing copies of the element c.
Make a vector of 10 c's:
Make a 3×4 array of c's:
Make a vector of 10 c's:
 Out[1]=

Make a 3×4 array of c's:
 Out[1]=
 Scope   (4)
A machine-zero vector:
A vector of exact zeros:
A machine-zero matrix:
A matrix of exact zeros:
A vector of ones:
A machine-number vector of ones:
A deeply nested constant array:
 Applications   (3)
Set up an array to use as storage in a program:
Numerically solve using Euler's method:
Find the sum of the elements in a list:
This can also be done with Total:
Use a vector of ones to see the effects of conditioning on the solution of a linear system:
The solution at machine precision has significant errors:
At higher precision, the solution is much better:
Normal[s] is identical to ConstantArray:
ConstantArray is equivalent to Apply[Table[c, ##]&, Map[List, dims]]: