Re: Concatenate matrices
- To: mathgroup at smc.vnet.net
- Subject: [mg51439] Re: [mg51404] Concatenate matrices
- From: DrBob <drbob at bigfoot.com>
- Date: Sun, 17 Oct 2004 03:05:55 -0400 (EDT)
- References: <200410160820.EAA23680@smc.vnet.net>
- Reply-to: drbob at bigfoot.com
- Sender: owner-wri-mathgroup at wolfram.com
Here are two methods: a = {{1, 2, 3}, {3, 4, 5}, {5, 6, 7}} b = {{11, 12}, {13, 14}, {15, 16}} Transpose[Join @@ Transpose /@ {a, b}] {{1, 2, 3, 11, 12}, {3, 4, 5, 13, 14}, {5, 6, 7, 15, 16}} Needs["LinearAlgebra`MatrixManipulation`"] BlockMatrix[{{a, b}}] {{1, 2, 3, 11, 12}, {3, 4, 5, 13, 14}, {5, 6, 7, 15, 16}} Bobby On Sat, 16 Oct 2004 04:20:37 -0400 (EDT), Thomas Guignard <thomas.guignard at epfl.ch> wrote: > Hi all > > Does somebody know if there's a simple function in mathematica to > concatenate matrices? > > Example: > > / 1 2 3 \ > A = | 3 4 5 | > \ 5 6 7 / > > / 11 12 \ > B = | 13 14 | > \ 15 16 / > > I'd like to have > > / 1 2 3 11 12 \ > R = | 3 4 5 13 14 | > \ 5 6 7 15 16 / > > And so on. See what I mean? > > Thanks a lot. > T. > -- DrBob at bigfoot.com www.eclecticdreams.net
- References:
- Concatenate matrices
- From: Thomas Guignard <thomas.guignard@epfl.ch>
- Concatenate matrices