[Date Index] [Thread Index] [Author Index]
Re: Count Number of Iteration [FindRoot]
On Sun, 25 Sep 2011 08:48:32 +0100, Afolabicrystal <afolabicrystal at gmail.com> wrote: > Hello group, > > I'm trying to find the roots of some functions using different > algorithms then compare with FindRoot. However, I'm using number of > iterations as my performance metric. > > Is there a function in Mathematica that I can use to count number of > iterations automatically especially in functions requiring iterations? > > Thanks. > Most functions of this type accept the StepMonitor option, which can be used to count or otherwise analyse the steps taken. Many detailed examples of this are given in the documentation for StepMonitor, so I will refrain from giving an example here.