MathGroup Archive 2006

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

Search the Archive

Re: Points sampled by FindMinimum


Andrew Moylan wrote:
> Hi all,
> 
> Please consider the following code, which asks FindMinimum to minimise
> a simple parabolic function while tracking at which which points
> FindMinimum evaluates the function:
> 
> func[x_?NumericQ] := (Print[x]; 1 + (x - 1)^2)
> FindMinimum[func[x], {x, 0.1}]

The option *StepMonitor* is better suited to this purpose

In[1]:=
func[(x_)?NumericQ] := 1 + (x - 1)^2
FindMinimum[func[x], {x, 0.1}, StepMonitor :> {Print[x]}]

 From In[1]:=
0.6

 From In[1]:=
1.

 From In[1]:=
1.

Out[2]=
{1.,{x\[Rule]1.}}

Regards,
Jean-Marc


  • Prev by Date: Re: Insertion into sorted list
  • Next by Date: I could do with a list of geometric shape names can anyone help????
  • Previous by thread: Re: Points sampled by FindMinimum
  • Next by thread: Re: Points sampled by FindMinimum