convert/Vector - convert a list, vector, array, Array, Vector, matrix or Matrix to a Vector
|
Calling Sequence
|
|
convert( A, Vector, ... );
convert( A, Vector[o], ... );
|
|
Parameters
|
|
A
|
-
|
list, vector, array, Array, Vector, matrix, Matrix; expression to convert
|
o
|
-
|
(optional) use either row or column; specifies result orientation
|
...
|
-
|
options to be passed to the Vector constructor
|
|
|
|
|
Description
|
|
•
|
The convert(A, Vector) function converts the parameter A into a Vector.
|
•
|
The orientation of the result can be specified via the parameter o. The default orientation is column.
|
•
|
If A is a 1-dimensional array or Array, a list, a vector or a Vector, it is simply passed directly to the Vector constructor, together with any additional options, and the orientation, o, if provided.
|
•
|
If A is a matrix, Matrix, 2-D array or 2-D Array, its columns or rows are concatenated to form the result. If the orientation parameter, o, is either not provided or is given as column, the columns of A are concatenated (from left to right) and a column Vector is returned. If the orientation parameter is given as row, the rows of A are concatenated (from top to bottom) and a row Vector is returned. Any additional parameters are passed to the Vector constructor when building the result.
|
•
|
Alternatively, use the ArrayTools[Copy] function. The ArrayTools[Copy] function copies data from an existing Matrix, Vector, or Array (source) to another Matrix, Vector, or Array (target).
|
|
|
Examples
|
|
>
|
|
| (1) |
>
|
|
| (2) |
>
|
|
| (3) |
>
|
|
| (4) |
>
|
|
>
|
|
| (5) |
>
|
|
| (6) |
>
|
|
| (7) |
>
|
|
| (8) |
>
|
|
| (9) |
>
|
|
| (10) |
>
|
|
| (11) |
>
|
|
| (12) |
>
|
|
| (13) |
>
|
|
| (14) |
>
|
|
| (15) |
|
|