MathGroup Archive 2004

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Concatenate matrices

  • To: mathgroup at
  • Subject: [mg51431] Re: Concatenate matrices
  • From: Bill Rowe <readnewsciv at>
  • Date: Sun, 17 Oct 2004 03:05:22 -0400 (EDT)
  • Sender: owner-wri-mathgroup at

On 10/16/04 at 4:20 AM, thomas.guignard at (Thomas Guignard)

>Does someone know if there is a function in Mathematica to simply
>concatenate matrices (provided their dimensions are right).


>    / e11  e12  e13 \
>E = | e21  e22  e23 |
>    \ e31  e32  e33 /

>    / f11  f12 \
>F = | f21  f22 |
>    \ f31  f32 /

>I'd like to have:

>    / e11  e12  e13  f11  f12 \
>R = | e21  e22  e23  f21  f22 |
>    \ e31  e32  e33  f31  f32 /

This can be done as follows:

m3 = Transpose@Join[Transpose@m1, Transpose@m2]

Here I've used m1, m2 and m3 as the name of the matrices to join to avoid usage of capital letters and conflict with built in symbols. Specifically, E is already defined by Mathematica and cannot be used as a matrix name.

An alternative approach to joining matrices in this fashion would be to use the routines in either LinearAlgebra`MatrixManipulation` or Statistics`DataManipulation`
To reply via email subtract one hundred and four

  • Prev by Date: Re: Concatenate matrices
  • Next by Date: Re: Concatenate matrices
  • Previous by thread: Re: Concatenate matrices
  • Next by thread: Re: Concatenate matrices