~Array
coerce to an Array
~Matrix
coerce to a Matrix
~Vector
coerce to a Vector
Calling Sequence
Parameters
Description
Thread Safety
Examples
Compatibility
~Array(a, options )
~Matrix(a, options )
~Vector(a, options )
~Vector[row](a, options )
~Vector[column](a, options )
a
-
any expression
options
(optional) bounds, datatype, order, etc.
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.
The ~Array, ~Matrix and ~Vector commands are thread-safe as of Maple 16.
For more information on thread safety, see index/threadsafe.
~Matrix⁡1,2,3,4
1234
v≔Vector⁡1,2,3
v≔123
~Matrix⁡v
123
~Matrix⁡v,datatype=float
1.2.3.
A1≔1,2,3
A1≔123
A0≔~Array⁡A1,0..
A00
1
A00≔5
A11
5
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
Download Help Document