type/Matrix - Maple Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Programming : Data Types : Type Checking : Types : type/Matrix

type/Matrix

check for a Matrix (rtable-based)

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

type(expr, Matrix)

type(expr, 'Matrix'(R))

Parameters

expr

-

any expression

R

-

Matrix shape, any Matrix option, the name square, or an expression sequence of these

Description

• 

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).

  

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.

Examples

AMatrix3,3,1,2,3,1,1,1,5,7,9

A:=123111579

(1)

typeA,Matrix

true

(2)

Check the contents of the Matrix.

typeA,'Matrix'numeric

true

(3)

Check the shape or options of the Matrix.

typeA,'Matrix'square

true

(4)

MatrixOptionsA

shape=,datatype=anything,storage=rectangular,order=Fortran_order

(5)

typeA,'Matrix'datatype=anything,order=Fortran_order,square

true

(6)

typeA,'Matrix'datatype=integer

false

(7)

See Also

Matrix

MatrixOptions

rtable

type

type/rtable

type/structure

 


Download Help Document

Was this information helpful?



Please add your Comment (Optional)
E-mail Address (Optional)
What is ? This question helps us to combat spam