Usage: |
hess = nmhessian(func, x0{, h, arraycap})
|
Input: |
| func | string, name of the function whose gradient is to be
computed. The function should have just one
parameter x, which is a n x k matrix (k >= 1)
x = (x1,x2,...,xk); xi (n x 1 vector; i=1..k)
represents points at which the function should be
evaluated. As a result, the function should return
k real numbers in the form of a 1 x k vector.
|
| x0 | n x 1 vector representing the point at which
the hessian is to be computed
|
| h | optional n x 1 vector or scalar (in the latter case,
h <- h * matrix(n) will be used);
vector of stepsizes for partial derivatives;
default value is 0.0001
|
| arraycap | optional scalar, indicates whether function
func is capable to deal with 3-dimensional arrays on
input (arraycap = 1, default) or not (arraycap = 0)
|
Output: |
| hess | n x n matrix, contains the computed hessian |