constant - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

# Online Help

###### All Products    Maple    MapleSim

The constant Indexing Function

Description

 • The constant indexing function can be used to construct rtable objects of type Array, Matrix, or Vector.
 • In the construction of a Matrix, the constant[x] indexing function specifies a Matrix whose entries all have the value x.
 • The specification is the same in the construction of Arrays and Vectors.
 • If an object is defined by using the constant indexing function, its elements cannot be reassigned.
 • Under normal circumstances, Maple only stores the value of x. To override this, specify a storage value.

Examples

 > $V≔\mathrm{Vector}\left(3,\mathrm{shape}=\mathrm{constant}\left[2\right]\right)$
 ${V}{≔}\left[\begin{array}{c}{2}\\ {2}\\ {2}\end{array}\right]$ (1)
 > $M≔\mathrm{Matrix}\left(1..2,1..2,\mathrm{shape}=\mathrm{constant}\left[3\right]\right)$
 ${M}{≔}\left[\begin{array}{cc}{3}& {3}\\ {3}& {3}\end{array}\right]$ (2)

 See Also