gradient | R Documentation |
This function computes the gradient of f
using finite differences.
gradient(f, binsize, multidimensional = FALSE)
f |
Either a numeric vector of a numeric matrix or a numeric array specifying the curve(s) that need to be differentiated.
|
binsize |
A numeric value specifying the size of the bins for computing finite differences. |
multidimensional |
A boolean specifying if the curves are
multi-dimensional. This is useful when |
A numeric array of the same shape as the input array f
storing the
gradient of f
obtained via finite differences.
out <- gradient(simu_data$f[, 1], mean(diff(simu_data$time)))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.