The identity Indexing Function
Description
Examples
The identity indexing function can be used to construct tables and rtable objects of type Array or Matrix.
In general, the identity indexing function returns 1 for all entries whose indices are identical, and returns 0 otherwise.
If an object is defined by using the identity indexing function, its elements cannot be reassigned.
In the case of a table, if you know that the elements may be reassigned, use the sparse indexing function instead.
Under normal circumstances, no storage is allocated for the entries of an object constructed by using the identity indexing function. To override this, specify a storage value.
M≔Matrix⁡3,3,shape=identity
M≔100010001
M1,2≔3
Error, invalid assignment of non-zero to identity off-diagonal
See Also
Array
indexfcn
Matrix
rtable
rtable_indexfcn
sparse
storage
table
Download Help Document