type/matrix - Maple Programming 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

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

type(A, matrix)

type(A, 'matrix'(R))

type(A, 'matrix'(R, square))

Parameters

A

-

expression

R

-

type -- type of the coefficient ring

Description

• 

This function checks whether its first argument is a Maple matrix. A matrix is defined to be a two-dimensional array with indices starting at 1.

• 

If the argument R is given, the function checks whether A is a matrix with entries from the domain R.

• 

If the argument square is given, then the function also checks if A is a square matrix.

• 

When the second or third syntax is used, it is essential to quote the word matrix in order to avoid confusion with the matrix function in the linalg package.

• 

Note: The command matrix has been superseded by Matrix.

Examples

typeArray1..2,1..2,matrix

false

(1)

typeArray0..2,0..2,matrix

false

(2)

Alinalg[matrix]2,3,1,2,3,4,52,6

A1234526

(3)

typeA,'matrix'integer

false

(4)

typeA,'matrix'rational

true

(5)

typeA,'matrix'rational,square

false

(6)

See Also

Array

linalg(deprecated)[matrix]

matrix(deprecated)

type

type/Matrix