Take the derivative of a vector v by calculating the difference between component x_i and x_(i-1).

derivative(v)

Arguments

v

A numeric vector

Value

A numeric vector