From: SourceForge.net <no...@so...> - 2008-03-08 14:25:57
|
Bugs item #1910043, was opened at 2008-03-08 06:12 Message generated for change (Comment added) made by willisbl You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=1910043&group_id=4933 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Lisp Core - Complex Group: None >Status: Pending >Resolution: Invalid Priority: 5 Private: No Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: Wrong calculation with nested matrices Initial Comment: If I am not mistaking, these two calculations should yield the same result, but do not in Maxima: input: matrix([0,0,0,1],[0,0,1,0],[0,-1,0,0],[-1,0,0,0]).matrix([0,0,0,-%i],[0,0,%i,0],[0,%i,0,0],[ -%i,0,0,0]); output: matrix([-%i,0,0,0],[0,%i,0,0],[0,0,-%i,0],[0,0,0,%i]) input: matrix([0,matrix([0,1],[1,0])],[matrix([0,-1],[-1,0]),0]).matrix([0,matrix([0,-%i],[%i,0])],[matrix([0,%i],[-%i,0]),0]); output: matrix([matrix([0,%i],[-%i,0]),matrix([0,0],[0,0])],[matrix([0,0],[0,0]),matrix([0,%i],[-%i,0])]) thus, there is something wrong, or am I wrong with that? Maxima version: 5.12.0Maxima build date: 15:52 7/20/2007host type: i686-pc-linux-gnulisp-implementation-type: GNU Common Lisp (GCL)lisp-implementation-version: GCL 2.6.7 ---------------------------------------------------------------------- >Comment By: Barton Willis (willisbl) Date: 2008-03-08 08:25 Message: Logged In: YES user_id=895922 Originator: NO To work with nested (or block) matrices, you'll need to set matrix_element_mult to ".". Try this (%i17) matrix_element_mult : "."$ (%i18) matrix([0,matrix([0,1],[1,0])],[matrix([0,-1],[-1,0]),0]).matrix([0,matrix([0,-%i],[%i,0])],[matrix([0,%i],[ -%i,0]),0])$ (%i20) mat_unblocker(%); (%o20) matrix([-%i,0,0,0],[0,%i,0,0],[0,0,-%i,0],[0,0,0,%i]) ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=1910043&group_id=4933 |