Usage: |
fdert = nmfder1d(t)
|
Input: |
| nmfder1dfunc | global variable, name of function (string) that has to
be restricted to a line by this quantlet; as a result,
the function should return a scalar
|
| nmfder1dfder | global variable, gradient of func (nmfder1dfunc);
there are several possible formats:
1. name of function (string) computing gradient of func;
output should be n x 1 vector
2. empty string; in this case the gradient will be
computed automatically using the quantlet nmgraddiff
with a default step h
3. a number or n x 1 vector h; the gradient will be computed
automatically using the quantlet nmgraddiff with
the given step h
|
| nmfder1dx | global variable, n x 1 vector, a point x0 on a line to
which the function should be restricted
|
| nmfder1dd | global variable, n x 1 vector, direction vector "direc" of a line
to which the function should be restricted
|
| nmfder1dh | optional, global variable, n x 1 vector or a scalar,
step h used by nmgraddiff when computing the gradient numerically
(only used when nmfder1dfder is not defined or is an empty string)
|
| t | scalar; the only input parameter of a restricted function
|
Output: |
| fdert | scalar; fdert = f'(t) = d(func(x0 + h*direc)) / dh in h=t |