[SciPy-user] any symbolic manipulation of eigenvalue in Scipy?

Xiaojian Wang wangxj.uc@gmail....
Tue Jun 9 18:21:54 CDT 2009


Hi,

I got so many inputs, thanks a lot for your time and help.
Have a nice day!

Xiaojian

ps
Andy Fraser,
Sorry, I am not the person from Portland State University.
You may know Dan Hammerand, he came from lanl and
works here right now.








On Tue, Jun 9, 2009 at 10:08 AM, Emmanuelle Gouillart <
emmanuelle.gouillart@normalesup.org> wrote:

> Hi Xiaojian ,
>
> you can use sympy, a very good Python module for symbolic mathematics
>
> >>> from sympy import Symbol, Matrix
>
> >>> a = Symbol('a')
>
> >>> b = Symbol('b')
>
> >>> c = Symbol('c')
>
> >>> m = Matrix(([a, b, a*b], [a+b, 0, 0], [c, a, c+b]))
>
> >>> m.det()
> -a*b*c + a**2*b**2 - a*b**2 - c*b**2 - b**3 + b*a**3
>
> >>> m.eigenvals()
> [... long lines of symbols!!]
>
> Check the sympy documentation on http://docs.sympy.org (and
> http://docs.sympy.org/modules/matrices.html#linear-algebra of linear
> algebra).
>
> Cheers,
>
> Emmanuelle
>
> On Tue, Jun 09, 2009 at 09:35:45AM -0700, Xiaojian Wang wrote:
> >    Hi,
> >    I would like to know if there is any module in Scipy (or Numpy?),
> which
> >    has capability
> >    of symbolic manipulation and can generate matrix's
> >    eigenvalues/eigenvectors.
> >    My matrix is symbolic, such as a 3x3 matrix:
>
> >    [ a,     b,   a*b  ]
> >    [a+b,  0,    0    ]
> >    [c,     a,     c+b]
>
> >    a,b,c could be any values in my future applications.
> >    if not, do you guy know any other programs can do this?
>
> >    Many thanks for your help in advance!
>
> >    Xiaoijan
>
> > _______________________________________________
> > SciPy-user mailing list
> > SciPy-user@scipy.org
> > http://mail.scipy.org/mailman/listinfo/scipy-user
>
>
> _______________________________________________
> SciPy-user mailing list
> SciPy-user@scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-user
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/scipy-user/attachments/20090609/8d202bc5/attachment.html 


More information about the SciPy-user mailing list