Matrix Manipulation
- To: mathgroup at smc.vnet.net
- Subject: [mg16389] Matrix Manipulation
- From: Andreas Paul Friedrich Bernhard <bernhard at eng.umd.edu>
- Date: Thu, 11 Mar 1999 02:16:54 -0500
- Organization: University of Maryland, College Park
- Sender: owner-wri-mathgroup at wolfram.com
I am trying to modify the elements of a submatrix in a matrix, without having to replace each element explicitly for example: mm = { {1,2,3}, {4,5,6}, {7,8,9} } msub = { {21,22}, {23,24} } I now wish to add the sub matrix: to positions (1,1),(1,3),(3,1),(3,3) I have tried using ReplacePart but it does not recognize the multidimensional replacement, I have also tried mm[ {{1,3} , {1,3}} ] = mm[ {{1,3} , {1,3}}] + msub but this crashes horribly Thanks AndyIII -- ------- What is man without the beasts, If all the beasts were gone, Man would die from great loneliness of Spirit. For whatever happens to the beasts, soon happens to man. - Chief Seattle ------- **************************************************** * Andreas P.F. Bernhard * * Aerospace Department, University of Maryland * * College Park, MD 20742 * * bernhard at Glue.umd.edu * * Fax: (301) 314-9001, Tel: (301) 405-1141 * ****************************************************
- Follow-Ups:
- Re: Matrix Manipulation
- From: Jurgen Tischer <jtischer@col2.telecom.com.co>
- Re: Matrix Manipulation