MathGroup Archive 2010

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

Search the Archive

Make a nested list in a loop!


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


  • Prev by Date: Re: Help with differential equation
  • Next by Date: Re: Matrix with number of rows / columns not fixed
  • Previous by thread: Re: Sorting a list of names
  • Next by thread: Re: Make a nested list in a loop!