View source: R/finiteDifferenceDerivatives.R
fdCoefficients | R Documentation |
Calculation of coefficients for finite-difference approximation of derivative of order p with error of order O(h^(p+k)), given a vector of function values.
fdCoefficients(p, k)
p |
Derivative order. |
k |
Desired accuracy. |
h |
Grid step size. |
f0 |
Value of function at differentiation point. |
fVal |
Values of function at points that will be used for approximation. |
If p+k is odd, the finite difference scheme will be asymmetric, with one more point on the negative side.
fdCoefficients
Vector of coefficients for linear combination of function values that will give the desired finite-difference approximation.
fdDerivative
numerical derivative based on vector of function values.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.