powered by
Numerical Gradient Vector
gradient0(f, x, args)
A list with the form of a gradient_result described in section "Gradient" of the package vignette.
gradient_result
Function to differentiate.
Vector at which to evaluate the gradient.
List of additional arguments from the function richardson_args.
richardson_args
f = function(x) { sum(sin(x)) } args = richardson_args() x0 = seq(0, 1, length.out = 5) cos(x0) ## Exact answer gradient0(f, x0, args) numDeriv::grad(f, x0)
Run the code above in your browser using DataLab