Take the central derivative of numeric vectors by averaging the forward and
backward differences.
Usage
cderiv(x)
Value
A matrix or vector the same dimensions as x, with the
derivative taken for each column of x. The first and last rows may
need to be deleted, depending on the application.
Arguments
x
A numeric matrix, or a vector which will be converted to a
single-column matrix.