On Thu, Jun 2, 2011 at 7:57 AM, iDan <[email protected]> wrote:
> Hi,
>
> With this code,
>
> sage: var('x y')
> sage: eq1 = 2*x + 3*y == 4
> sage: eq2 = 3*x + 4*y == 5
> sage: Mat=maxima.augcoefmatrix([eq1,eq2],[x,y])
>
> I obtain a "Maxima matrix". How can I transform it into a "Sage
> Matrix" ?
> I try
>
> sage: matrix(2,3,[Mat[0],Mat[1]])
>
> but without success.
Use "Mat.sage()":
sage: var('x y')
sage: eq1 = 2*x + 3*y == 4
sage: eq2 = 3*x + 4*y == 5
sage: Mat=maxima.augcoefmatrix([eq1,eq2],[x,y])
sage: Mat
matrix([2,3,-4],[3,4,-5])
sage: Mat.sage()
[ 2 3 -4]
[ 3 4 -5]
sage: type(Mat.sage())
<type 'sage.matrix.matrix_symbolic_dense.Matrix_symbolic_dense'>
--
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org