MathGroup Archive 2006

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

Search the Archive

Points sampled by FindMinimum


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 output is:

0.1
0.1
0.1
0.6
0.6
0.6
1.
1.
1.
1.
1.
1.

But I would have expected output more like:

0.1
0.6
1.
1.

Can anyone explain why FindMinimum evaluates func three times at each
test point, instead of once?

Cheers,
Andrew


  • Prev by Date: Merge of Matrices
  • Next by Date: Re: Evaluating integral with varying upper limit?
  • Previous by thread: Re: Merge of Matrices
  • Next by thread: Points sampled by FindMinimum