I just noticed that usual parentheses work as square brackets for Matrices,

M:=Matrix(2,[a,b,c,d]);

                                 [a    b]
                            M := [      ]
                                 [c    d]
M(1,2)=M[1,2];
                                b = b

That leads to the following,

M(x,y);
Error, unsupported type of index, x

while that worked OK for matrices,

m:=matrix(2,2,[a,b,c,d]);

                                 [a    b]
                            m := [      ]
                                 [c    d]
m(x,y);
                         [a(x, y)    b(x, y)]
                         [                  ]
                         [c(x, y)    d(x, y)]

Is this described somewhere in the help pages?

Alec


Please Wait...