MathGroup Archive 2010

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

Search the Archive

Re: How to concatenate matrices?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg113098] Re: How to concatenate matrices?
  • From: Bill Rowe <readnews at sbcglobal.net>
  • Date: Wed, 13 Oct 2010 12:39:01 -0400 (EDT)

On 10/12/10 at 1:49 PM, emammendes at gmail.com (Eduardo M. A. M.Mendes)
wrote:

>Although I read the help on matrices, I could not figure out how to
>concatenate two matrices.

>What I have is:

>B1 - (vector) - as a result of P21.x1 (product of a matrix and a
>vector)

>B2 - (vector) - as a result of P22.x2

>B=[B1,B2]  -  that is, a matrix with two columns.

Mathematica syntax 101 states square brackets are *always* used
to group arguments to a function. And since the notation
B=[B1,B2] doesn't use any defined function, this cannot possibly
be correct. You should have gotten an error message if that is
what you tried.

>Join, Append, and all sort of funny functions return even funnier
>results (elements with {}).

 From your description above, the result you want should be
achieved by doing

Transpose[{B1, B2}]

If this doesn't work for you, try posting an example of what you
did and what it is you want to achieve and you will likely get a
better answer.



  • Prev by Date: Version Advisory -- Can I automate?
  • Next by Date: Re: Tutorial for running remote kernels?
  • Previous by thread: Re: How to concatenate matrices?
  • Next by thread: Re: How to solve this differential equation? (harmonic