Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2006

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

Search the Archive

Re: Combining Matrices

  • To: mathgroup at
  • Subject: [mg65066] Re: Combining Matrices
  • From: "J Siehler" <jsiehler at>
  • Date: Sun, 12 Mar 2006 23:59:58 -0500 (EST)
  • References: <duudan$ht1$>
  • Sender: owner-wri-mathgroup at

Gregory Lypny wrote:
> Hello Everyone,
> I'm trying to figure out how to combine an n x p matrix and an n x q
> matrix to form an n x (p + q) matrix.  I found one way, shown in the
> second last line of the code below, but I have no idea why it works,
> and I'm wondering whether there is a more direct way.

I often define the operation this way:

Beside[a_,b_]:=MapThread[Join, {a,b}]

This works particularly nicely with infix notation; you can write such
things as


and I find that very easy to read.

  • Prev by Date: Re: Plot3D
  • Next by Date: Re: 3D-plot over a triangle
  • Previous by thread: Combining Matrices
  • Next by thread: Re: Combining Matrices