From: SourceForge.net <no...@so...> - 2007-07-19 16:29:18
|
Bugs item #1751951, was opened at 2007-07-11 09:51 Message generated for change (Comment added) made by willisbl You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=1751951&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: None Group: None >Status: Pending >Resolution: Fixed Priority: 4 Private: No Submitted By: Miguel Aguado (maguado) Assigned to: Barton Willis (willisbl) Summary: diag_matrix() with block matrices gets off-diag boxes wrong Initial Comment: Hello, I couldn't find this bug among the reports, sorry if I didn't search hard enough. The problem is related to "linearalgebra," concretely to function diag_matrix, which is said in the documentation to create appropriate off-diagonal zero blocks when its arguments are matrices. This is not so, as in the following example: (%i2) b1 : matrix( [ 1 ] ); (%o2) [ 1 ] (%i3) b2 : matrix( [ 0, 1 ], [ 7, 9 ] ); [ 0 1 ] (%o3) [ ] [ 7 9 ] (%i4) dma : diag_matrix( b1, b2 ); [ 0 1 ] (%o4) diag_matrix([ 1 ], [ ]) [ 7 9 ] (%i5) load("linearalgebra"); (%o5) /usr/share/maxima/5.10.0/share/linearalgebra/linearalgebra.mac (%i6) dma : diag_matrix( b1, b2 ); [ [ 1 ] [ 0 ] ] [ ] (%o6) [ [ 0 0 ] [ 0 1 ] ] [ [ ] [ ] ] [ [ 0 0 ] [ 7 9 ] ] Obviously, mat_unblocker fails to handle this output. Thanks in advance, Miguel ------------------------------------------------------------- \; Maxima version: 5.10.0 Maxima build date: 14:57 10/18/2006 host type: i686-pc-linux-gnu lisp-implementation-type: GNU Common Lisp (GCL) lisp-implementation-version: GCL 2.6.7 \; ------------------------------------------------------------- ---------------------------------------------------------------------- >Comment By: Barton Willis (willisbl) Date: 2007-07-19 11:29 Message: Logged In: YES user_id=895922 Originator: NO Fixed by linearalgebra.mac CVS revison 1.6. (%i12) b1 : matrix( [ 1 ] ); (%o12) matrix([1]) (%i13) b2 : matrix( [ 0, 1 ], [ 7, 9 ] ); (%o13) matrix([0,1],[7,9]) (%i14) dma : diag_matrix( b1, b2 ); (%o14) matrix([matrix([1]),matrix([0,0])],[matrix([0],[0]),matrix([0,1],[7,9])]) (%i15) mat_unblocker(%); (%o15) matrix([1,0,0],[0,0,1],[0,7,9]) ---------------------------------------------------------------------- Comment By: Barton Willis (willisbl) Date: 2007-07-14 14:58 Message: Logged In: YES user_id=895922 Originator: NO Oh, I think that you are suggesting that size of the zero matrices in the off-diagonal entries be adjusted so that mat_unblocker will work. OK. I'll try to do that. Thanks for the bug report. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=1751951&group_id=4933 |