Description Usage Arguments Details Value Note References See Also Examples

Finite difference approximation using Fornberg's method for the derivatives of order 1 to k based on irregulat grid values.

1 | ```
fornberg(x, y, xs, k = 1)
``` |

`x` |
grid points on the x-axis, must be distinct. |

`y` |
discrete values of the function at the grid points. |

`xs` |
point at which to approximate (not vectorized). |

`k` |
order of derivative, |

Compute coefficients for finite difference approximation for the derivative
of order `k`

at `xs`

based on grid values at points in `x`

.
For `k=0`

this will evaluate the interpolating polynomial itself, but
call it with `k=1`

.

Returns a matrix of size `(length(xs))`

, where the (k+1)-th column
gives the value of the k-th derivative. Especially the first column returns
the polynomial interpolation of the function.

Fornberg's method is considered to be numerically more stable than applying Vandermonde's matrix.

LeVeque, R. J. (2007). Finite Difference Methods for Ordinary and Partial Differential Equations. Society for Industrial and Applied Mathematics (SIAM), Philadelphia.

1 2 3 4 5 6 7 8 |

pracma documentation built on June 21, 2017, 9:01 a.m.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.