Re: How to concatenate matrices?
- To: mathgroup at smc.vnet.net
- Subject: [mg113133] Re: How to concatenate matrices?
- From: Sebastian Schmitt <sschmitt at physi.uni-heidelberg.de>
- Date: Wed, 13 Oct 2010 23:29:08 -0400 (EDT)
- References: <201010121749.NAA03450@smc.vnet.net>
Hi Eduardo!
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.
>
> Join, Append, and all sort of funny functions return even funnier results
> (elements with {}).
Is this what you are looking for?
In[133]:= v1 = {a, b, c};
In[134]:= v2 = {d, e, f};
In[136]:= matrix = Transpose[{v1, v2}]
Out[136]= {{a, d}, {b, e}, {c, f}}
Cheers,
Sebastian
- References:
- How to concatenate matrices?
- From: "Eduardo M. A. M.Mendes" <emammendes@gmail.com>
- How to concatenate matrices?