NewtonsMethod:
--------------------------------------------------------------------------
Solve an optimization problem with Newton's method.
Requires the objective value, gradient vector, and hessian matrix to be
defined with function handles.
--------------------------------------------------------------------------
Form:
[xopt,nSteps,cpuTime,iterate,objValue] = ...
NewtonsMethod(f,grad,hess,x,stopData,stepSizeData);
See also: Armijo.m, NLEqSolver.m
--------------------------------------------------------------------------
------
Inputs
------
f @(x) Function handle for cost function
grad @(x) Function handle for gradient of cost function
hess @(x) Function handle for hessian of cost function
x (n,1) Initial state
stopData . Data structure with fields:
.fun Function handle with arguments "f(x), grad(x)"
returning true if stop conditions met, else false.
.maxIter Maximum number of iterations.
.gTol Gradient norm tolerance. Stop when norm of gradient
vector is below this threshold.
stepSizeData .rule Name of the stepsize rule. 3 choices:
- Constant (define s)
- Armijo (define s, sigma, beta)
.s Scalar stepsize.
.sigma Scale factor for Armijo rule
.beta Scale factor for Armijo rule
-------
Outputs
-------
xopt (n,1) Optimal solution
nSteps (1,1) Number of iteration steps computed
cpuTime (1,1) Total time to execute, in seconds
iterate (1,nSteps) History of iterate
objValue (1,nSteps) History of objective value
--------------------------------------------------------------------------
Children:
Common: Math/Armijo