<< uncprb_getgrdfd Unconstrained Optimization Problems Toolbox uncprb_gethesfd >>

Unconstrained Optimization Problems Toolbox >> Unconstrained Optimization Problems Toolbox > uncprb_gethesfcn

uncprb_gethesfcn

Returns the function value.

Calling Sequence

H=uncprb_gethesfcn(n,m,x,nprob)

Parameters

n:

the number of variables, i.e. the size of x

m:

the number of functions, i.e. the size of fvec

x:

a n x 1 matrix of doubles, the point where to compute f

nprob:

the problem number

H:

a nxn matrix of doubles, the Hessian matrix

Description

It is an interface function which calls the function func(which selects appropriate test fuction based on nprob) to return H. The Hessian matrix is not available for all problems. If the Hessian matrix is not available, an error is generated.

Examples

// Get Hessian at x0 for Rosenbrock's test case
nprob = 1
[n,m,x0]=uncprb_getinitf(nprob)
H = uncprb_gethesfcn(n,m,x0,nprob)

// Get Hessian at xopt for Rosenbrock's test case
nprob = 1
[n,m,x0]=uncprb_getinitf(nprob)
[fopt,xopt] = uncprb_getopt(nprob,n,m)
H = uncprb_gethesfcn(n,m,xopt,nprob)
// See the eigenvalues, the conditionning
spec(H)
cond(H)

Authors

<< uncprb_getgrdfd Unconstrained Optimization Problems Toolbox uncprb_gethesfd >>