MathGroup Archive 2009

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Manipulating list

  • To: mathgroup at
  • Subject: [mg101579] Re: [mg101486] Manipulating list
  • From: kosal lee <leekosal at>
  • Date: Fri, 10 Jul 2009 06:48:07 -0400 (EDT)
  • References: <20090708212106.9TL15.214884.imail@eastrmwml42>

To all who answered my question about manipulating list.
I want to say thank you very much.

best regards,

From: Bob Hanlon <hanlonr at>
To: kosal lee <leekosal at>; mathgroup at
Sent: Thursday, July 9, 2009 10:21:06 AM
Subject: [mg101579] Re: [mg101486] Manipulating list

MapThread[Prepend, {list2, Last /@ list1}]

Prepend @@@ Thread[{list2, Last /@ list1}]

Flatten /@ Thread[{Last /@ list1, list2}]

Bob Hanlon

---- kosal lee <leekosal at> wrote: 

Hello Mathematica users

I am new to Mathematica and I have one particular problem I would like you to help me.
Suppose I have two lists:

    list1 = {{A,B,C},{D,E,F},{G,H,I}}
    list2 = {{1,2},{3,4},{5,6}}

I want to have the third elements in each of member list in list1 (that is, C,F,I) to appear in the first position in each member list in list2

that is, i want to have  list ={{C,1,2},{F,3,4},{I,5,6}}

Thank you.

  • Prev by Date: Re: Manipulating list
  • Next by Date: Re: 2dFFT & image processing
  • Previous by thread: Re: Manipulating list
  • Next by thread: Re: Manipulating list