On Thu, 22 Mar 2007 12:48:47 -0600, Robert Dodier wrote:
> On 3/22/07, Ryan Krauss <ryanlists at gmail.com> wrote:
>
>> Update: this code works until I load the vect package:
> vect's effect on "." has caused trouble before. I don't remember if
> we came to any conclusions about it. I don't have any specific
> advice at the moment, but that's the root of the problem here.
I'm a bit late to the party it seems, but the nasty hacky workaround I've
been doing is to simply undeclare the commutative property when I need to
do matrix mult and then redeclaring it afterwards. Guess one could make it
a little more robust by putting it is some function so that you can't
forget to fix the commutative property afterwards. FWIW, this is how I do
it:
(%i1) load("vect");
...
(%i2) M:matrix([1,2], [3,4]);
(%o2) matrix([1,2],[3,4])
(%i3) M.[1,2];
(%o3) matrix([7,10])
(%i4) [1,2].M;
(%o4) matrix([7,10])
(%i5) remove(".", commutative)$
(%i6) M.[1,2];
(%o6) matrix([5],[11])
(%i7) [1,2].M;
(%o7) matrix([7,10])
(%i8) declare(".", commutative);
(%o8) done
(%i9) M.[1,2];
(%o9) matrix([7,10])
(%i10) [1,2].M;
(%o10) matrix([7,10])
(%i11)
Regards
Neilen
>
> Robert
--
you know its kind of tragic
we live in the new world
but we've lost the magic
-- Battery 9 (www.battery9.co.za)