type/Matrix
check for a Matrix (rtable-based)
Calling Sequence
Parameters
Description
Supertypes
Examples
type(expr, Matrix)
type(expr, 'Matrix'(R))
expr
-
any expression
R
Matrix shape, any Matrix option, the name square, a type, or an expression sequence of these
A Maple Matrix is an rtable with subtype option Matrix.
The type(expr, Matrix) function returns true if expr is a Maple Matrix.
The type(expr, 'Matrix'(R)) function returns true if expr is a Maple Matrix with the shapes or options given in R (see Matrix for permissible shapes and options), or if the entries of expr have type R in case R is a Maple type.
If R includes the name 'square', the Matrix dimensions are checked for equality.
Note: It is essential to quote the word Matrix in this form of the calling sequence in order to avoid confusion with the Matrix(..) constructor function.
type/rtable
A≔Matrix⁡3,3,1,2,3,1,1,1,5,7,9
A≔123111579
type⁡A,Matrix
true
Check the contents of the Matrix.
type⁡A,Matrix⁡numeric
Check the shape or options of the Matrix.
type⁡A,Matrix⁡square
MatrixOptions⁡A
shape=,datatype=anything,storage=rectangular,order=Fortran_order
type⁡A,Matrix⁡datatype=anything,order=Fortran_order,square
type⁡A,Matrix⁡datatype=integer
false
See Also
Formats/ByType/Matrix
Matrix
MatrixOptions
rtable
type
type/structure
Download Help Document