Usage: |
x = bfgs (x0, f, df, maxiter {,eps, gamma})
|
Input: |
| x0 | n x 1 vector of starting value
|
| f | text, name of the procedure where the function is defined
|
| df | text, name of the procedure where the derivative of the function is defined
|
| maxiter | integer, maximal number of iterations
|
| eps | scalar, bfgs stops, if df(x_i) < eps (i=1...n) (default = 1.0e-03)
|
| gamma | scalar, starting value for linesearch (default = 1.0)
|
Output: |
| x.minimum | n x 1 vector, coordinates of the minimum found |
| x.iter | integer, number of iterations needed |
| x.converged | 1 if the algorithm has converged and 0 if it has not |