MathGroup Archive 2012

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

Search the Archive

Re: Mathematica loop help

  • To: mathgroup at
  • Subject: [mg125488] Re: Mathematica loop help
  • From: Martin Scherer <martin.scherer at>
  • Date: Thu, 15 Mar 2012 00:33:04 -0500 (EST)
  • Delivered-to:

Here is a simple example of what I'am trying to do:
sols = {};
Table[{sol = FindRoot[a x == 0, Drop[sols, Length[sols] - 1]];  AppendTo[sols, sol]}, {a, 1, 10}]

in every iteration FindRoot should use the last solution (sol) as the new starting point for searching the new solution. The second statement Drop[...] accesses the last element inserted into sols. The third statement inserts the current solution at the end of sols.

But given example leads to an infinite recursion. I do not understand why.

Any help appropriated.


  • Prev by Date: Re: yet another Evaluate question
  • Next by Date: Re: Button Behavior OnClick
  • Previous by thread: Re: Mathematica loop help
  • Next by thread: Re: Mathematica loop help