Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #15674
| From | DrMajorBob <btreat1@austin.rr.com> |
|---|---|
| Newsgroups | comp.soft-sys.math.mathematica |
| Subject | Re: list manipulation |
| Date | 2011-02-11 09:15 +0000 |
| Organization | Steven M. Christensen and Associates, Inc and MathTensor, Inc. |
| Message-ID | <ij2umr$7l3$1@smc.vnet.net> (permalink) |
list1 = Array[a, 10];
list2 = Array[b, 10];
Thread[{list1, list2}]
{{a[1], b[1]}, {a[2], b[2]}, {a[3], b[3]}, {a[4], b[4]}, {a[5],
b[5]}, {a[6], b[6]}, {a[7], b[7]}, {a[8], b[8]}, {a[9],
b[9]}, {a[10], b[10]}}
or
Transpose@{list1, list2}
{{a[1], b[1]}, {a[2], b[2]}, {a[3], b[3]}, {a[4], b[4]}, {a[5],
b[5]}, {a[6], b[6]}, {a[7], b[7]}, {a[8], b[8]}, {a[9],
b[9]}, {a[10], b[10]}}
Bobby
On Thu, 10 Feb 2011 04:19:50 -0600, 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
>
--
DrMajorBob@yahoo.com
Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread
Re: list manipulation DrMajorBob <btreat1@austin.rr.com> - 2011-02-11 09:15 +0000
csiph-web