generateGrid2 | R Documentation |
Creates a list of unique evaluation points for second derivatives: both
diagonal (\partial^2 / \partial x_i^2
) and cross
(\partial^2 / \partial x_i \partial x_j
).
generateGrid2(x, side, acc.order, h)
x |
Numeric vector or scalar: the point(s) at which the derivative is estimated.
|
side |
Integer scalar or vector indicating the type of finite difference:
|
acc.order |
Integer or vector of integers specifying the desired accuracy order
for each element of |
h |
Numeric or character specifying the step size(s) for the numerical
difference or a method of automatic step determination ( |
A list with elements:
xlist
: a list of unique coordinate shifts,
w
: the finite-difference weights (one per point),
i1
, i2
: integer vectors giving partial-derivative indices.
The length of each vector matches xlist
.
GenD()
, Hessian()
.
generateGrid2(1:4, side = rep(0, 4), acc.order = c(2, 6, 4, 2),
h = c(1e-5, 1e-4, 2e-5, 1e-6))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.