#1746 Multiplication of block matrices

closed
nobody
Lisp Core (471)
5
2009-09-06
2009-08-29
Anonymous
No

a: matrix(
[1,2],
[3,4]
);
b: matrix(
[a,a],
[a,a]
);
c:b.b;
gives the output for c
matrix([matrix([2,8],[18,32]),matrix([2,8],[18,32])],[matrix([2,8],[18,32]),matrix([2,8],[18,32])])
each element in 'c' is the corresponding element of 'a' squared and then multiplied by 2.
I think the result of the multiplication of block matrices should be the same as if the matrices were unblocked.
-------------------------------------------------------------

Maxima version: 5.19.0
Maxima build date: 20:33 8/9/2009

host type: i686-pc-mingw32

lisp-implementation-type: GNU Common Lisp (GCL)

lisp-implementation-version: GCL 2.6.8

Discussion

  • Barton Willis

    Barton Willis - 2009-08-29

    Maybe you want to set matrix_element_mul to "."

    (%i6) matrix_element_mul : "."$
    (%i7) a: matrix([1,2],
    [3,4]);
    b: matrix([a,a],[a,a]);
    c:b.b;
    (%o7) matrix([1,2],[3,4])
    (%o8) matrix([matrix([1,2],[3,4]),matrix([1,2],[3,4])],[matrix([1,2],[3,4]),matrix([1,2],[3,4])])
    (%o9) matrix([matrix([2,8],[18,32]),matrix([2,8],[18,32])],[matrix([2,8],[18,32]),matrix([2,8],[18,32])])

     
  • Barton Willis

    Barton Willis - 2009-09-06
    • status: open --> closed
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks