convert/Matrix
convert an array, Array, vector, Vector, matrix, Matrix or list to a Matrix
Calling Sequence
Parameters
Options
Description
Examples
Compatibility
convert( A, Matrix, opts )
A
-
array, Array, vector, Vector, matrix, Matrix, string, list; expression to convert
opts
(optional) one or more options as described below
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.
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.
A≔1,2,3,4
A1≔convert⁡A,Matrix
A1≔1234
type⁡A,Matrix
false
type⁡A1,Matrix
true
M≔matrix⁡3,3,1,1,1,1,2,3,7,8,9
M≔111123789
M1≔convert⁡M,Matrix,datatype=float
M1≔1.1.1.1.2.3.7.8.9.
type⁡M,Matrix
type⁡M1,Matrix
convert⁡1,2,3\n4,5,6\n7,8,9,Matrix,sourceformat=CSV
123456789
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
Download Help Document