+1 for including this function... I had made the same one, but mine is
actually 5 times slower than the one proposed in trac 6245 :P

Is it possible to not name it "hadamard_product"? Coming from MatLab,
I've used it hundreds of time, but I would have never recognized that
"hadamard_product" could be the name associated to it.

If possible, in case of a new function, I would call it
"mul_something" so that anybody looking for some sort of
multiplication could enter: "mul[Tab]" and get something like:
"mul_elementwise", and immediately recognize the meaning :) In my
opinion, guessing the first letters of the operation (multiplication)
is much easier than guessing those of the adjective (elementwise?
hadamard?...).

OffTopic: Just for the records, for the same reason I would like to
find an alias of the "find_root" function, with the name
"solve_numerical" or something like that, so that when I do "sol[Tab]"
I get all the functions related to solving an equation, whatever the
domain.

Regards

Maurizio

On 15 Giu, 17:08, Jason Grout <jason-s...@creativetrax.com> wrote:
> 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/011a...)
> 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to