MathGroup Archive 2005

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

Search the Archive

Re: FixedPoint

  • To: mathgroup at
  • Subject: [mg62235] Re: [mg62227] FixedPoint
  • From: Kristjan Kannike <kkannike at>
  • Date: Thu, 17 Nov 2005 04:15:33 -0500 (EST)
  • References: <>
  • Sender: owner-wri-mathgroup at

On Wed, 16 Nov 2005, Scott wrote:

> Anybody know how to get FixedPoint to reveal how many iterations it had
> to perform before it found the fixed point; i.e. what n was when SameQ
> was satisfied and FixedPoint exited.


There's the FixedPointList function that gives all the intermediate
results, stopping when the elements no longer change -- so the length of
the returned list is the number of iterations + 1. Thus you need

{result, length} = With[{fpl = FixedPointList[yourFunction,
yourInitialCond]}, {Last[fpl], Length[fpl]-1}]

Kristjan Kannike

  • References:
  • Prev by Date: Re: Magnetic Pendulum
  • Next by Date: Re: FixedPoint
  • Previous by thread: Re: FixedPoint
  • Next by thread: Re: FixedPoint