diagonal - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.
Our website is currently undergoing maintenance, which may result in occasional errors while browsing. We apologize for any inconvenience this may cause and are working swiftly to restore full functionality. Thank you for your patience.

Online Help

All Products    Maple    MapleSim


The diagonal Indexing Function

 

Description

Examples

Description

• 

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.

Examples

VVector1,2,3

V123

(1)

MMatrix1..4,1..4,V,shape=diagonal

M1000020000300000

(2)

See Also

identity

indexfcn

Matrix

rtable

rtable_indexfcn

sparse

table

 


Download Help Document