Re: Extracting elements of lists
- To: mathgroup at smc.vnet.net
- Subject: [mg45486] Re: [mg45458] Extracting elements of lists
- From: "Sseziwa Mukasa,,(978) 536-2359" <mukasa at jeol.com>
- Date: Sat, 10 Jan 2004 00:00:33 -0500 (EST)
- References: <200401091020.FAA24583@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
On Jan 9, 2004, at 5:20 AM, sashan wrote: > Hi > > I'm trying to extract a elements from a list and return another list > with those elements. I've tried doing it using a while loop and > recursion and haven't been able to do it. > > The list I'm working with is a list of lists where each inner list > contains 4 elements. Example: > {{0, 1, 0, 0}, {0.04, 1, -0.0008, 0}, {0.1, 0.999987, -0.00499995, > 0}, {0.15, 0.999937, -0.0112494, 0}, {0.18, 0.999869, -0.0161983, > 0},.... > Try l[[All,{1,2}]] I suggest looking at Part in the documentation. Regards, Ssezi
- References:
- Extracting elements of lists
- From: sashan <nothing@important.com>
- Extracting elements of lists