MathGroup Archive 2003

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

Search the Archive

need help avoiding underflow errors in Nestlist

  • To: mathgroup at smc.vnet.net
  • Subject: [mg40817] need help avoiding underflow errors in Nestlist
  • From: ddkapan at yahoo.com (D. D. Kapan)
  • Date: Sat, 19 Apr 2003 23:02:19 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

Hi,

I have defined g to takes four values between 0 & 1 and then then
return four values on this same interval from a system of four coupled
equations.

>g[{px1a_, px2a_, py1a_, py2a_}]= {px1p, px2p, py1p, py2p} /. pars3 //
      Simplify;

where p**p are p' versions of four differential equations that work
correctly(not shown).

I would like to use NestList to generate a series of simsize*simsize
simulation of simtime+1 from random starting points and what I have
works:

>Table[NestList[g, {Random[], Random[], Random[], Random[]}, 
    simtime], {simsize}, {simsize}];

except, depending on initial conditions & for some parameter values,
the equation(s) smoothly move towards zero (as they should) and
eventually cause underflow problems.  What I would like to do is
modify g to only calculate down to an arbitrarily small number (e.g.
10^-10) and otherwise return 0 when "nesting" with Nestlist.

I am aware of Chop and its arguments, but I haven't been able to
implement a redefinition of g such that Chop functions inside the
Nestlist or a better call to Nestlist to do the same.  I have tinkered
with many other functions (including NestWhileList & FixedPointList)
but I am stumped since I would like the output to create a non-ragged
array.

Any help would be greatly appreciated!

Durrell


  • Prev by Date: Re: Simple question
  • Next by Date: Elliptic Curves and Mathematica
  • Previous by thread: Re: curve fitting
  • Next by thread: need help avoiding underflow errors in Nestlist