convert/Vector - Maple Programming Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Programming : Data Types : Conversion : convert/Vector

convert/Vector

convert a list, vector, array, Array, Vector, matrix or Matrix to a Vector

 

Calling Sequence

Parameters

Description

Examples

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

L1,0

L1,0

(1)

L1convertL,Vector

L110

(2)

typeL,Vector

false

(3)

typeL1,Vector

true

(4)

Aarray1..4:

forito3doAii2end do:printA

149`?`4

(5)

A1convertA,Vector,datatype=float

A11.4.9.0.

(6)

typeA,Vector

false

(7)

typeA1,Vector

true

(8)

Vlinalg[vector]3,1,x,x2

V1xx2

(9)

V1convertV,Vector

V11xx2

(10)

typeV,Vector

false

(11)

typeV1,Vector

true

(12)

M1,2,3|4,5,6

M142536

(13)

convertM,Vector

123456

(14)

convertM,Vector[row]

142536

(15)

See Also

Array

ArrayTools[Copy]

convert

convert/vector

list

Matrix

rtable

type/Vector

Vector

vector(deprecated)