[Numpy-discussion] matlab ss2tf in python/symbols in linear
Scott Askey
scotta_2002@yahoo....
Tue Oct 14 08:12:59 CDT 2008
The numpy poly function work to solve most of my problem. As soon as I realized the poly in numpy base and matlab perform the same funtion I was ble to efficintly transform my state space model (A B C D ) into polynomial transfer funtions.
H=num/den num=(poly(A-dot(B,C))-poly(A)) den = poly(A)
Symbolically I was able to solve
from sympy import *
Matrix(s*I -A +dot(B,C)).berkowitz()
however it was orders of magnitude slower.
V/R
Scott
--- On Fri, 10/10/08, numpy-discussion-request@scipy.org <numpy-discussion-request@scipy.org> wrote:
> From: numpy-discussion-request@scipy.org <numpy-discussion-request@scipy.org>
> Subject: Numpy-discussion Digest, Vol 25, Issue 26
> To: numpy-discussion@scipy.org
> Date: Friday, October 10, 2008, 10:13 AM
> Send Numpy-discussion mailing list submissions to
> numpy-discussion@scipy.org
>
>
> Message: 2
> Date: Fri, 10 Oct 2008 04:02:21 -0700 (PDT)
> From: Scott Askey <scotta_2002@yahoo.com>
> Subject: [Numpy-discussion] matlab ss2tf in python/symbols
> in linear
> algebra/transfer functions
> To: numpy-discussion@scipy.org
> Message-ID:
> <893083.2737.qm@web36501.mail.mud.yahoo.com>
> Content-Type: text/plain; charset=us-ascii
>
>
>
>
> > Subject: matlab ss2tf in python/symbol in linear
> algebra/transfer functions
> > To: numpy-discussion@scipy.org
> > Date: Thursday, October 9, 2008, 5:36 PM
> > Is there a clever way to do symbolic linear algebra
> with
> > python? What is the prober tool for doing linear
> algebra
> > with matrices containing symbols?
> >
> >
> > V/R
> >
> > Scott
>
>
>
>
>
> ------------------------------
>
> Message: 4
> Date: Fri, 10 Oct 2008 13:56:47 +0200
> From: Gael Varoquaux <gael.varoquaux@normalesup.org>
> Subject: Re: [Numpy-discussion] matlab ss2tf in
> python/symbols in
> linear algebra/transfer functions
> To: Scott Askey <scotta_2002@yahoo.com>
> Cc: numpy-discussion@scipy.org
> Message-ID:
> <20081010115647.GA26097@phare.normalesup.org>
> Content-Type: text/plain; charset=iso-8859-1
>
> On Fri, Oct 10, 2008 at 04:02:21AM -0700, Scott Askey
> wrote:
> > > Subject: matlab ss2tf in python/symbol in linear
> algebra/transfer functions
> > > To: numpy-discussion@scipy.org
> > > Date: Thursday, October 9, 2008, 5:36 PM
> > > Is there a clever way to do symbolic linear
> algebra with
> > > python? What is the prober tool for doing linear
> algebra
> > > with matrices containing symbols?
>
> Have a look at sympy: http://code.google.com/p/sympy/
>
> Ga?l
>
>
More information about the Numpy-discussion
mailing list