convert/Vector
convert a list, vector, array, Array, Vector, matrix or Matrix to a Vector
Calling Sequence
Parameters
Description
Examples
convert( A, Vector, ... );
convert( A, Vector[o], ... );
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
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).
L≔1,0
L1≔convert⁡L,Vector
L1≔10
type⁡L,Vector
false
type⁡L1,Vector
true
A≔array⁡1..4:
forito3doAi≔i2enddo:print⁡A
149`?`4
A1≔convert⁡A,Vector,datatype=float
A1≔1.4.9.0.
type⁡A,Vector
type⁡A1,Vector
V≔linalgvector⁡3,1,x,x2
V≔1xx2
V1≔convert⁡V,Vector
V1≔1xx2
type⁡V,Vector
type⁡V1,Vector
M≔1,2,3|4,5,6
M≔142536
convert⁡M,Vector
123456
convert⁡M,Vectorrow
142536
See Also
Array
ArrayTools[Copy]
convert
convert/vector
list
Matrix
rtable
type/Vector
Vector
vector(deprecated)
Download Help Document
What kind of issue would you like to report? (Optional)