paramaniac wrote: > Dear Sage Developers, > > It would be very nice if Sage supported the element-wise > multiplication of matrices like the .* operator in Octave/Matlab. >
I was about to point out the recent thread about this, but then realized it was you that started that thread and acknowledged the response. Are you saying that you would like to see the code mentioned in that thread (http://groups.google.com/group/sage-support/browse_thread/thread/011a3be7944100dd/fc37571d035a25c6?show_docid=fc37571d035a25c6) incorporated into Sage as a function, maybe as P.hadamard_product() or something? Jason > 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 -~----------~----~----~----~------~----~------~--~---