Sorry, I don't understand your example. If A1 = matrix([[a1,b1],[c1,d1]]) A2 = matrix([[a2,b2],[c2,d2]]) then A1.*A2 = ????
On Mon, Jun 15, 2009 at 10:52 AM, paramaniac<luka...@student.ethz.ch> wrote: > > Dear Sage Developers, > > It would be very nice if Sage supported the element-wise > multiplication of matrices like the .* operator in Octave/Matlab. > > EXAMPLE: > > sigma, tau, beta = var('sigma tau beta') > A = matrix([[-1/tau, sigma/tau],[sigma/tau, -1/tau]]) > B = matrix([[beta/tau, 0],[0, beta/tau]]) > C = matrix([[1,0],[0,1]]) > D = matrix([[0,0],[0,0]]) > I = identity_matrix(2) > s, t = var('s t') > P = C*(s*I-A)^(-1)*B+D > P = P.simplify_rational() > > RGA = P .* P.inverse().transpose() > > Regards, > Lukas > > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---