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

Online Help

All Products    Maple    MapleSim


convert/Matrix

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

 

Calling Sequence

Parameters

Options

Description

Examples

Compatibility

Calling Sequence

convert( A, Matrix, opts )

Parameters

A

-

array, Array, vector, Vector, matrix, Matrix, string, list; expression to convert

opts

-

(optional) one or more options as described below

Options

• 

copy : truefalse

  

Indicates whether a new rtable should be allocated when converting from other rtable types such as Array or Vector. The default is false, meaning that convert will attempt to provide a reference to the existing rtable instead of allocating a new one.

• 

format : string

  

A string corresponding to one of the file formats described in Formats. The input expr will be decoded using the specified format and the data returned as a Matrix. If the format specified is not one for which a Matrix is a valid output type, an error is issued.

• 

sourceformat : string

  

A synonym for the option format for consistency with other convert subroutines.

• 

Any other options specified will be passed to the Matrix constructor.

Description

• 

The convert(A, Matrix) function converts A into a Matrix. This is accomplished by simply passing A and any additional parameters to the Matrix constructor.

Examples

A1,2,3,4

A1,2,3,4

(1)

A1convertA,Matrix

A11234

(2)

typeA,Matrix

false

(3)

typeA1,Matrix

true

(4)

Mmatrix3,3,1,1,1,1,2,3,7,8,9

M111123789

(5)

M1convertM,Matrix,datatype=float

M11.1.1.1.2.3.7.8.9.

(6)

typeM,Matrix

false

(7)

typeM1,Matrix

true

(8)

convert1,2,3\n4,5,6\n7,8,9,Matrix,sourceformat=CSV

123456789

(9)

Compatibility

• 

The convert/Matrix command was updated in Maple 2022.

• 

The copy, format and sourceformat options were introduced in Maple 2022.

• 

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

See Also

Array

convert

convert/matrix

convert/Vector

list

Matrix

matrix(deprecated)

rtable

table

type/Matrix

Vector