Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #15753

Re: list manipulation

From olfa <olfa.mraihi@yahoo.fr>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: list manipulation
Date 2011-02-11 09:17 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <ij2us6$7qt$1@smc.vnet.net> (permalink)
References <ij0e3h$98o$1@smc.vnet.net>

Show all headers | View raw


On 10 f=E9v, 11:19, Andrea <andrea.dellapat...@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
Hi Andrea,
Hope this helps:
 Transpose[{{x1, x2, x3} , {y1, y2, y3}}]

gives the output  {{x1, y1}, {x2, y2}, {x3, y3}}

Back to comp.soft-sys.math.mathematica | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

list manipulation Andrea <andrea.dellapatria@gmail.com> - 2011-02-10 10:19 +0000
  Re: list manipulation olfa <olfa.mraihi@yahoo.fr> - 2011-02-11 09:17 +0000
  Re: list manipulation dimos <dimemples@gmail.com> - 2011-02-12 10:16 +0000
  Re: list manipulation Oleksiy <avroslyak@gmail.com> - 2011-02-11 09:13 +0000

csiph-web