Returns the function value.
H=uncprb_gethesfcn(n,m,x,nprob)
the number of variables, i.e. the size of x
the number of functions, i.e. the size of fvec
a n x 1 matrix of doubles, the point where to compute f
the problem number
a nxn matrix of doubles, the Hessian matrix
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.
// 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) | ![]() | ![]() |