Hello Gema,
You just need to run the following:
sage: m.sage_matrix(QQ)
[-6 5 4 3 0]
[ 6 0 -2 -3 1]
[ 6 -1 0 -3 2]
[ 6 -1 -2 0 3]
[-6 1 2 3 0]
or you can replace ZZ with whatever ring you want the matrix to be over.
--Mike
On Mon, Jun 30, 2008 at 8:31 AM, gema m. <[EMAIL PROTECTED]> wrote:
>
> Hello,
>
> I have a matrix "m" that's a Singular object and I would like to
> compute the eigenvalues via SAGE. So I have to import such a matrix to
> SAGE, am i right? But , how? could you help me , please? Here I send
> my code:
>
> sage: singular.lib('rootsmr.lib')
> sage: singular.ring(0,'(x,y,z)','dp')
> sage: I=singular.ideal(['x2+y+z-1','y2+z+x-1','z2+y+x-1'])
> sage: J=I.radical()
> sage: H=J.groebner()
> sage: q=H.qbase()
> sage: f=singular.poly('x+2y+3z')
> sage: m=f.matmult(q,H)
> sage: m
>
> -6,5, 4, 3, 0,
> 6, 0, -2,-3,1,
> 6, -1,0, -3,2,
> 6, -1,-2,0, 3,
> -6,1, 2, 3, 0
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
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
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---