On Thu, Jun 4, 2009 at 1:40 PM, Harald Schilly <harald.schi...@gmail.com> wrote:
>
> I got this bug report from the "report a problem" link in the
> notebook:
>
> problem description:
>
> I did some basic control systems theory, but the output looks way too
> much complicated, previous version was much better in this aspect.
> A = matrix([[1,-3,-1,-2],[2,-1,1,-1],[0,2,-3,1],[-3,4,-1,1]])
> B = matrix([[0,-2],[1,0],[0,1],[3,0]])
> C = matrix([[1,0,4,0],[0,0,2,1]])
> D = matrix([[0,0],[0,0]])
> I = identity_matrix(4)
> s = var('s')
> P = C*(s*I-A)^(-1)*B+D
> P
> P.simplify()
> P.expand()
>

This probably gives what he wants:

sage: P.simplify_rational()
[        (11*s^2 - 58*s - 33)/(s^4 + 2*s^3 - s^2 + 18*s + 41)
(2*s^3 - 11*s^2 - s - 37)/(s^4 + 2*s^3 - s^2 + 18*s + 41)]
[(3*s^3 + 23*s^2 + 12*s + 70)/(s^4 + 2*s^3 - s^2 + 18*s + 41)  (2*s^3
+ 3*s^2 + 17*s - 47)/(s^4 + 2*s^3 - s^2 + 18*s + 41)]


--Mike

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to 
sage-devel-unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to