Countnumberofdays while function = TRUE

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Dear list,

I've got a rather complicated problem:
I need to calculate the number of days an animal stays in an age-group,
based on its growth (depends on the weight of the animal and the day of the
year).

The weight of an animal on day x van be calculated as Wx = W(x-1) +
(0.1*W(x-1)^(2/3)-0.05*W(x-1))*f(Temp) With f(Temp) is a temperature
dependent function (ranges from 0-1).

In column A I calculated f(Temp) for each day (365 rows). In column B I want
the number of days before the animal reaches a certain weight (let's say, 10
grams). The number of days depends on the day of the year the animal enters
the simulation (Temp dependence).
A fictive example below:

A B
f(Temp) # days
0.30 30
0.31 29.3
0.32 29
0.33 ...
0.34
....
0.99
1.00
0.99
0.98
....
0.30

So, B2 (and the other cells in column B) should be something like (e.g.
start weight = 1 gram):
countnumberofdays while Wx=W(x-1)+(0.1*W(x-1)^(2/3)-0.05*W(x-1))*f(Temp) <=
10 grams.
I think it should be something with a Do ... Loop function, but I'm a
complete VBA nitwit.

Does anyone knows if this is possible?

Maarten

.



Relevant Pages

  • Re: Analysing predicted values from individual regressions
    ... the same time when the group had an averaged weight of 50 and 75 kg. ... I am interested in producing a growth curves for each level of sex and ... prediction error can be moderately high as live weight measurements ... >> I am looking for references or suggestions on how to analyse predicted ...
    (sci.stat.edu)
  • Re: A great article regarding those picky eaters...it will make you feel better!
    ... If people of different ethnic groups have different growth profiles, ... And what do you do when the clinic has the charts for white, Asian, ... and Latino but you're out of the black charts and have a new black kid ... the same age are heavier than my child, but whether his current weight ...
    (misc.kids)
  • Re: Countnumberofdays while function = TRUE
    ... Regards, ... Tom Ogilvy ... > dependent function. ... > the number of days before the animal reaches a certain weight (let's say, ...
    (microsoft.public.excel.programming)