Re: Concatenate matrices
- To: mathgroup at smc.vnet.net
- Subject: [mg51427] Re: [mg51404] Concatenate matrices
- From: Bob Hanlon <hanlonr at cox.net>
- Date: Sun, 17 Oct 2004 03:05:15 -0400 (EDT)
- Reply-to: hanlonr at cox.net
- Sender: owner-wri-mathgroup at wolfram.com
These are all equivalent Table[Join[A[[n]],B[[n]]],{n,Length[A]}] Join[#[[1]],#[[2]]]& /@ Transpose[{A,B}] Join[Sequence@@##]& /@ Transpose[{A,B}] Using an add-on package: Needs["LinearAlgebra`MatrixManipulation`"]; AppendRows[A,B] Bob Hanlon > > From: Thomas Guignard <thomas.guignard at epfl.ch> To: mathgroup at smc.vnet.net > Date: 2004/10/16 Sat AM 04:20:37 EDT > To: mathgroup at smc.vnet.net > Subject: [mg51427] [mg51404] Concatenate matrices > > 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. > > -- > Thomas Guignard > Laboratory of Electromagnetics and Acoustics > Swiss Federal Institute of Technology, Lausanne > >