~Array - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


~Array

coerce to an Array

~Matrix

coerce to a Matrix

~Vector

coerce to a Vector

 

Calling Sequence

Parameters

Description

Thread Safety

Examples

Compatibility

Calling Sequence

~Array(a, options )

~Matrix(a, options )

~Vector(a, options )

~Vector[row](a, options )

~Vector[column](a, options )

Parameters

a

-

any expression

options

-

(optional) bounds, datatype, order, etc.

Description

• 

These functions accept any expression, a, and try to coerce it to the type implied by their base name and options. They are often used in conjunction with coercion, a part of procedure parameter processing, but can also be called directly.

• 

Coercion may succeed if a is any of the following types: list, listlist, Matrix, matrix, Vector, vector, Array.  If coercion succeeds, the result will look very much the same as the original input. If coercion fails, the result will be NULL.

• 

The result may be an alias of the input argument.  An alias is simply a different view of the same data.  This is memory efficient as no copy operation is involved.  It also means that modifying the result will change the input.  This is especially desirable when used in conjunction with parameter processing.

Thread Safety

• 

The ~Array, ~Matrix and ~Vector commands are thread-safe as of Maple 16.

• 

For more information on thread safety, see index/threadsafe.

Examples

~Matrix1,2,3,4

1234

(1)

vVector1,2,3

v123

(2)

~Matrixv

123

(3)

~Matrixv,datatype=float

1.2.3.

(4)

A11,2,3

A1123

(5)

A0~ArrayA1,0..

A00

1

(6)

A005

A005

(7)

A11

5

(8)

Compatibility

• 

The ~Array, ~Matrix and ~Vector commands were introduced in Maple 16.

• 

For more information on Maple 16 changes, see Updates in Maple 16.

See Also

Array

coercion

Matrix

parameter

procedure

Vector