 MTM/full - Maple Help

MTM

 full
 identity matrix
 issparse
 sparse identity matrix Calling Sequence full(X) issparse(X) Parameters

 X - list, Vector, Matrix, or array Description

 • full(X) returns a dense Vector, Matrix, or Array corresponding to X.
 • issparse(X) returns true when X is a Vector, Matrix, or Array with sparse storage and false otherwise.
 • If n is an integer and m is omitted, the resulting matrix is square.
 • If the input X is an array, its elements are used as the dimensions of the matrix. Examples

 > $\mathrm{with}\left(\mathrm{MTM}\right):$
 > $S≔\mathrm{Matrix}\left(\left[\left[7,4,0\right],\left[0,2,0\right],\left[0,0,6\right]\right],\mathrm{storage}=\mathrm{sparse}\right)$
 ${S}{≔}\left[\begin{array}{ccc}{7}& {4}& {0}\\ {0}& {2}& {0}\\ {0}& {0}& {6}\end{array}\right]$ (1)
 > $\mathrm{full}\left(S\right)$
 $\left[\begin{array}{ccc}{7}& {4}& {0}\\ {0}& {2}& {0}\\ {0}& {0}& {6}\end{array}\right]$ (2)
 > $M≔\mathrm{full}\left(\mathrm{speye}\left(4,5\right)\right)$
 ${M}{≔}\left[\begin{array}{ccccc}{1}& {0}& {0}& {0}& {0}\\ {0}& {1}& {0}& {0}& {0}\\ {0}& {0}& {1}& {0}& {0}\\ {0}& {0}& {0}& {1}& {0}\end{array}\right]$ (3)
 > $\mathrm{issparse}\left(S\right)$
 ${\mathrm{true}}$ (4)
 > $\mathrm{issparse}\left(M\right)$
 ${\mathrm{false}}$ (5) Compatibility

 • The MTM[full] and MTM[issparse] commands were introduced in Maple 2021.