Re: Using Select with arrays? (Relative newbie)
- To: mathgroup at smc.vnet.net
- Subject: [mg54257] Re: Using Select with arrays? (Relative newbie)
- From: János <janos.lobb at yale.edu>
- Date: Mon, 14 Feb 2005 21:50:52 -0500 (EST)
- References: <200502140317.WAA14058@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
On Feb 13, 2005, at 10:17 PM, Hugo Mallinson wrote:
> data = {
> {1, 1, string1, c, d}
> {1, 2, string2, c, d}
> {1, 3, string3, c, d}
> {1, 4, string4, c, d}
> {2, 1, string1, c, d}
> {2, 2, string2, c, d}
> {3, 1, string3, c, d}
> {4, 1, string2, c, d}
> {4, 2, string4, c, d}
> }
The comas are missing between the sublists... in data.
In[8]:=
Select[data, #1[[1]] == 3 & ]
Out[8]=
{{3, 1, string3, c, d}}
János
- References:
- Using Select with arrays? (Relative newbie)
- From: Hugo Mallinson <hfm21@cam.ac.uk>
- Using Select with arrays? (Relative newbie)