MathGroup Archive 2005

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

Search the Archive

Help on iteration

  • To: mathgroup at
  • Subject: [mg54942] Help on iteration
  • From: Clifford Martin <camartin at>
  • Date: Mon, 7 Mar 2005 02:10:26 -0500 (EST)
  • Sender: owner-wri-mathgroup at

I've got a simple problem I can't seem to get right.
Here is a sample set of data


What I want to do is look at the 14th element in each
sublist. (For example in the above example data that
would be values q, Q and tt). If any value is equal to
zero (in my example lets say that tt =0) I want to
1.Check the date.
 2.Pull a value associated with that date ,lets call
it zzz. (that I've entered somewhere else and made a
  3. Calculate a new value for tt (non zero) using a
calculation such as (s-C)+zzz.
  4. Replace the value of tt(that was zero) with the
new calculated value.
5. I want to do this for every list in my data set.
  My actual case is a bit more complicated than this
but if I can see how to do something like this I can
probably figure out my problem. Thanks for any help.


  • Prev by Date: Re: Bug in Import?
  • Next by Date: Re: Kernel Problem
  • Previous by thread: Re: Outputing a tabular function
  • Next by thread: Re: Help on iteration