Make a nested list in a loop!

*To*: mathgroup at smc.vnet.net*Subject*: [mg112258] Make a nested list in a loop!*From*: Sebastian <sebpinski at googlemail.com>*Date*: Tue, 7 Sep 2010 02:00:55 -0400 (EDT)

initdata = Import[datadir, "Data"]; f = 1; Do[ If[omin <= initdata[[e, 2]] <= omax, data[f] = initdata[e]; f = f + 1] , {e, 1, Length[initdata]}]; Can someone please help, I'm trying to create a nested list from some data that is already as a nested list. Basically initdata has loads of rows but only 5 columns and looks as follow: {{a,b,c,d,e},{f,g,h,i,j},{k...etc. I'm trying to reduce the number of rows by comparing the 2nd column of each row to a predefined maximum and minimum (omax, omin respectively). Then if this value is accepted, the whole row gets nested into the new 'data' array. Running the code as is above I get the following errors: "Symbol::argx: Symbol called with arguments; 1 argument is expected" Thanks for any help in advance. Seb