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


Groups > comp.soft-sys.math.mathematica > #15724 > unrolled thread

list manipulation

Started byAndrea <andrea.dellapatria@gmail.com>
First post2011-02-10 10:19 +0000
Last post2011-02-11 09:13 +0000
Articles 4 — 4 participants

Back to article view | Back to comp.soft-sys.math.mathematica


Contents

  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

#15724 — list manipulation

FromAndrea <andrea.dellapatria@gmail.com>
Date2011-02-10 10:19 +0000
Subjectlist manipulation
Message-ID<ij0e3h$98o$1@smc.vnet.net>
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

[toc] | [next] | [standalone]


#15753

Fromolfa <olfa.mraihi@yahoo.fr>
Date2011-02-11 09:17 +0000
Message-ID<ij2us6$7qt$1@smc.vnet.net>
In reply to#15724
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}}

[toc] | [prev] | [next] | [standalone]


#15787

Fromdimos <dimemples@gmail.com>
Date2011-02-12 10:16 +0000
Message-ID<ij5mml$jg7$1@smc.vnet.net>
In reply to#15724
Make a function like this:
f[x_List, y_List] := Thread[{x, y}]

[toc] | [prev] | [next] | [standalone]


#15931

FromOleksiy <avroslyak@gmail.com>
Date2011-02-11 09:13 +0000
Message-ID<ij2uj7$7h9$1@smc.vnet.net>
In reply to#15724
On Feb 10, 5:19 am, 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

{list1,list2}//Transpose

[toc] | [prev] | [standalone]


Back to top | Article view | comp.soft-sys.math.mathematica


csiph-web