The diagonal Indexing Function
Description
Examples
The diagonal indexing function can be used to construct tables and rtable objects of type Array or Matrix.
The diagonal indexing function returns 0 as the value for all components whose indices are not identical.
In the construction of an m x n diagonal Matrix (rtable-based), if the initializer parameter is a Vector, then the entries of this Vector are placed along the main diagonal of the constructed Matrix, starting at position (1, 1).
Under normal circumstances, Maple only stores the diagonal elements.
If an object is defined by using the diagonal indexing function, the elements located off the diagonal cannot be reassigned.
In the case of a table, if you know that the elements may be reassigned, use the sparse indexing function instead.
V≔Vector⁡1,2,3
V≔123
M≔Matrix⁡1..4,1..4,V,shape=diagonal
M≔1000020000300000
See Also
identity
indexfcn
Matrix
rtable
rtable_indexfcn
sparse
table
Download Help Document