Re: Countnumberofdays while function = TRUE



had a stray x = 1

x = 0
do
x = x + 1
res = W(x-1) + _
(0.1*W(x-1)^(2/3)-0.05*W(x-1))*f(Temp)
Loop while res <= 10

If reaching exactly 10 is a stop point then change the condition to

Loop while res < 10
--
Regards,
Tom Ogilvy

"Tom Ogilvy" <twogilvy@xxxxxxx> wrote in message
news:O6DexSnJGHA.1424@xxxxxxxxxxxxxxxxxxxxxxx
> x = 1
> x = 0
> do
> x = x + 1
> res = W(x-1) + _
> (0.1*W(x-1)^(2/3)-0.05*W(x-1))*f(Temp)
> Loop while res <= 10
>
> --
> Regards,
> Tom Ogilvy
>
>
> "Maarten" <Maarten@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
> news:608AE9E0-B7C8-4B72-A5F2-BDFD5CFE7D42@xxxxxxxxxxxxxxxx
> > But B doesn't contain the weights of the animals. The weights should be
> > calculated invisible, behind each cell in B.
> > B1 may only contain the number of days the animal needs to reach a
weight
> of
> > 10 grams, assuming that it enters the simulation on the day that
> corresponds
> > to cell B1
> >
> > B2 may only contain the number of days the animal needs to reach a
weight
> of
> > 10 grams, assuming that it enters the simulation on the day that
> corresponds
> > to cell B2
> >
> > B3 may only contain the number of days the animal needs to reach a
weight
> of
> > 10 grams, assuming that it enters the simulation on the day that
> corresponds
> > to cell B3
> >
> > etc...
> >
> >
> >
> >
> > "Tom Ogilvy" wrote:
> >
> > > If each row is a day, then it should be as simple as:
> > > =countif(B:B,"<=10")
> > >
> > > No macro required.
> > >
> > > As a further example, If you want to count >10 and <=20
> > >
> > > =Countif(B:B,">10")-Countif(B:B,">20")
> > >
> > >
> > >
> > > --
> > > Regards,
> > > Tom Ogilvy
> > >
>
>


.



Relevant Pages

  • Re: massive data analysis with lisp
    ... while res do ... (loop for k being the hash-keys in movidx using (hash-value v) ... (if (not (gethash custid assoctab)) ...
    (comp.lang.lisp)
  • Re: massive data analysis with lisp
    ... while res do ... (loop for k being the hash-keys in movidx using (hash-value v) ... (if (not (gethash custid assoctab)) ...
    (comp.lang.lisp)
  • Re: little isprime challenge
    ... Would it be faster to compute the square root of p, and use it as the loop ... The speed of your routine will be ... > res = .false. ... > COMMON block which contains an array holding the primes found so far. ...
    (comp.lang.fortran)
  • Re: Seaching across the top
    ... if not res is nothing then ... msgbox "Not found" ... It keeps running the loop until one ...
    (microsoft.public.excel.programming)
  • Re: Image for composite types
    ... String a la 'Image for scalar types. ... Age: Natural; ... Weight: Float; ... Person'Number_Of_Components loop ...
    (comp.lang.ada)