Re: extracting a list to a list, help please
- To: mathgroup at smc.vnet.net
- Subject: [mg46235] Re: extracting a list to a list, help please
- From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
- Date: Thu, 12 Feb 2004 07:16:00 -0500 (EST)
- Organization: Universitaet Leipzig
- References: <c07p1q$kk7$1@smc.vnet.net>
- Reply-to: kuska at informatik.uni-leipzig.de
- Sender: owner-wri-mathgroup at wolfram.com
Hi, use one of the variants below Take[#, 2] & /@ mylist1 Drop[#, -2] & /@ mylist1 mylist1 /. {a_?AtomQ, b_, ___} :> {a, b} Part[#, {1, 2}] & /@ mylist1 Transpose[Take[Transpose[mylist1], 2]] Regards Jens Serge wrote: > > Hello, > > I am a beginner in Mathematica and I have a rather simple question. I > made some calculations that I need for an orbit and I have a list that > look like this: > > mylist1 = {{a1,b1,c1,d1},{a2,b2,c2,d2},{a3,b3,c3,d3},etc} > > All I want to do is to make a list of the form > > mylist2 = {{a1,b1},{a2,b2},{a3,b3},etc} > > from the original list (mylist1), > > so that I can ListPlot those pairs of points (they represent x and y > coordinates for some orbit). I am having trouble figuring out how to do > this. I tried using the Table command but I couldn't get it into the > above form. I would greatly appreciate if someone can help me out. > Thanks so much. > > Best, > Serge