Re: Mathematica loop help
- To: mathgroup at smc.vnet.net
 - Subject: [mg125488] Re: Mathematica loop help
 - From: Martin Scherer <martin.scherer at gcsc.uni-frankfurt.de>
 - Date: Thu, 15 Mar 2012 00:33:04 -0500 (EST)
 - Delivered-to: l-mathgroup@mail-archive0.wolfram.com
 
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.
Greetings,
Martin
- Follow-Ups:
- Re: Mathematica loop help
- From: Bob Hanlon <hanlonr357@gmail.com>
 
 
 - Re: Mathematica loop help