MathGroup Archive 2006

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

Search the Archive

Re: Loop and Lost values - The Sequel

To my mind the trouble is that, implicitly,
you test floating point values for equality,
which is usually not recommended.

Assuming the equation depends on t1,
you could, for example, proceed this way :

t1[i_Integer] = 94.8+0.001*i;

Do[eq = {x'[t]==0.001*x[t]*t1[i], x[0]==1};
   sol = NDSolve[eq,{x},{t,0,10}];
   xt[i] = Interpolation[Table[{t,x[t]/.sol//First},{t,0,10}]],

Do[Print[{t1[i], xt[i][3.2]}], {i,0,9}]




  • Prev by Date: Re: Count Function
  • Next by Date: Sphere
  • Previous by thread: Loop and Lost values - The Sequel
  • Next by thread: Re: Transformstion to canonical form