convert/array - Maple Help

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

convert/array

convert to array

 Calling Sequence convert(object, array)

Parameters

 object - list, table, or array

Description

 • The convert/array function converts a list, a table, or an array to an array.
 • When the input object is an array, convert/array will return the object in a dense representation.
 • Note: The command array has been superseded by Array.

Examples

 > $\mathrm{convert}\left(\left[\left[1,2\right],\left[3,4\right]\right],\mathrm{array}\right)$
 $\left[\begin{array}{rr}{1}& {2}\\ {3}& {4}\end{array}\right]$ (1)
 > $A≔\mathrm{linalg}[\mathrm{randmatrix}]\left(3,3,\mathrm{symmetric}\right)$
 ${A}{:=}\left[\begin{array}{rrr}{-}{7}& {22}& {-}{94}\\ {22}& {-}{55}& {87}\\ {-}{94}& {87}& {-}{56}\end{array}\right]$ (2)
 > $\mathrm{lprint}\left(\right)$
 array(symmetric,1 .. 3, 1 .. 3,[(1, 3)=-94,(1, 1)=-7,(3, 3)=-56,(1, 2)=22,(2, 2)=-55,(2, 3)=87])
 > $\mathrm{convert}\left(A,\mathrm{array}\right)$
 $\left[\begin{array}{rrr}{-}{7}& {22}& {-}{94}\\ {22}& {-}{55}& {87}\\ {-}{94}& {87}& {-}{56}\end{array}\right]$ (3)
 > $\mathrm{lprint}\left(\right)$
 array(1 .. 3, 1 .. 3,[(2, 3)=87,(3, 2)=87,(1, 1)=-7,(3, 1)=-94,(1, 3)=-94,(2, 1)=22,(3, 3)=-56,(2, 2)=-55,(1, 2)=22])