Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #5681
| From | "Dr. Wolfgang Hintze" <weh@snafu.de> |
|---|---|
| Newsgroups | comp.soft-sys.math.mathematica |
| Subject | Re: How to create this kind of list |
| Date | 2011-10-16 11:16 +0000 |
| Organization | Steven M. Christensen and Associates, Inc and MathTensor, Inc. |
| Message-ID | <j7eees$ekp$1@smc.vnet.net> (permalink) |
| References | <j7bm30$35r$1@smc.vnet.net> |
You can use Transpose[] like this
n = 3;
va = Table[a[i], {i, 1, n}]
vb = Table[b[i], {i, 1, n}]
{a[1], a[2], a[3]}
{b[1], b[2], b[3]}
Transpose[{va, vb}]
{{a[1], b[1]}, {a[2], b[2]}, {a[3], b[3]}}
--- Wolfgang
"Szymon Roziewski" <szymon.roziewski@gmail.com> schrieb im Newsbeitrag
news:j7bm30$35r$1@smc.vnet.net...
> Hello there,
> I am thinking about creating such a list.
> I have 2 lists with the same number of elements.
> The idea is to create one list which was taken from these previous
> two ones
> in the following way:
> Take one element of the first list and one from another and put it
> into
> result list {{x1,y1},{x2,y2},...,{xn,yn}}.
> Input lists:
> A={x1,x2,...,xn}
> B={y1,y2,...,yn}
>
> All best,
> Szymon Roziewski
Back to comp.soft-sys.math.mathematica | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
How to create this kind of list Szymon Roziewski <szymon.roziewski@gmail.com> - 2011-10-15 10:08 +0000 Re: How to create this kind of list Helen Read <readhpr@gmail.com> - 2011-10-16 11:08 +0000 Re: How to create this kind of list "Oleksandr Rasputinov" <oleksandr_rasputinov@hmamail.com> - 2011-10-16 11:11 +0000 Re: How to create this kind of list "Dr. Wolfgang Hintze" <weh@snafu.de> - 2011-10-16 11:16 +0000 Re: How to create this kind of list dimitris <dimmechan@yahoo.com> - 2011-10-16 11:17 +0000
csiph-web