Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #15694 > unrolled thread
| Started by | Bob Hanlon <hanlonr@cox.net> |
|---|---|
| First post | 2011-02-11 09:14 +0000 |
| Last post | 2011-02-11 09:14 +0000 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.soft-sys.math.mathematica
Re: list manipulation Bob Hanlon <hanlonr@cox.net> - 2011-02-11 09:14 +0000
| From | Bob Hanlon <hanlonr@cox.net> |
|---|---|
| Date | 2011-02-11 09:14 +0000 |
| Subject | Re: list manipulation |
| Message-ID | <ij2ulh$7jo$1@smc.vnet.net> |
list1 = Array[x, 4]
{x[1], x[2], x[3], x[4]}
list2 = Array[y, 4]
{y[1], y[2], y[3], y[4]}
Either
list3 = Transpose[{list1, list2}]
{{x[1], y[1]}, {x[2], y[2]}, {x[3], y[3]}, {x[4], y[4]}}
or
list3 = Thread[{list1, list2}]
{{x[1], y[1]}, {x[2], y[2]}, {x[3], y[3]}, {x[4], y[4]}}
% == %%
True
Bob Hanlon
---- Andrea <andrea.dellapatria@gmail.com> wrote:
=============
hello, I need help about the following question:
I have two N-dimensional lists:
list1={x1,x2,...,xN} list2={y1,y2,...,yN}
How to create the N-dimrnsional list: list3={{x1,y1},{x2,y2},...,
{xN,yN}} ?
I've tried so hard but I didn't work it out!
Tanks in advance for your support
Andrea
Back to top | Article view | comp.soft-sys.math.mathematica
csiph-web