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: Mon, 21 Apr 2003 06:51:05 -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