matrix to Matrix - Maple Help

convert/Matrix

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

 Calling Sequence convert( A, Matrix, ... );

Parameters

 A - array, Array, vector, Vector, matrix, Matrix, list; expression to convert ... - options to 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

 > $A≔\left[\left[1,2\right],\left[3,4\right]\right]$
 ${A}{≔}\left[\left[{1}{,}{2}\right]{,}\left[{3}{,}{4}\right]\right]$ (1)
 > $\mathrm{A1}≔\mathrm{convert}\left(A,\mathrm{Matrix}\right)$
 ${\mathrm{A1}}{≔}\left[\begin{array}{cc}{1}& {2}\\ {3}& {4}\end{array}\right]$ (2)
 > $\mathrm{type}\left(A,\mathrm{Matrix}\right)$
 ${\mathrm{false}}$ (3)
 > $\mathrm{type}\left(\mathrm{A1},\mathrm{Matrix}\right)$
 ${\mathrm{true}}$ (4)
 > $M≔\mathrm{matrix}\left(3,3,\left[\left[1,1,1\right],\left[1,2,3\right],\left[7,8,9\right]\right]\right)$
 ${M}{≔}\left[\begin{array}{ccc}{1}& {1}& {1}\\ {1}& {2}& {3}\\ {7}& {8}& {9}\end{array}\right]$ (5)
 > $\mathrm{M1}≔\mathrm{convert}\left(M,\mathrm{Matrix},\mathrm{datatype}=\mathrm{float}\right)$
 ${\mathrm{M1}}{≔}\left[\begin{array}{ccc}{1.}& {1.}& {1.}\\ {1.}& {2.}& {3.}\\ {7.}& {8.}& {9.}\end{array}\right]$ (6)
 > $\mathrm{type}\left(M,\mathrm{Matrix}\right)$
 ${\mathrm{false}}$ (7)
 > $\mathrm{type}\left(\mathrm{M1},\mathrm{Matrix}\right)$
 ${\mathrm{true}}$ (8)