The derivative is estimated as the ratio of the first-difference of var
divided by the first-difference of time
. To make the results
have the same length as time
, the final result is appended at
the end.
derivative(var, t)
variable.
time in seconds.