nderiv
Numerical differentiation of a real function of one real variable.
yp=nderiv(func, v)
Inputs
func A function object representing a function of the form y=f(x) which returns the value of the function whose derivative is to be calculated.
v The value of x at which the derivative is required.
Outputs
yp The derivative of the specified function with respect to the argument value at v .


Description
nderiv uses a four point numerical differentiation formula.


Example
>>nderiv(@(x)sin(x),pi/4)
       0.7071
>>nderiv(@(x)sin(x^2+3x+2)*x,pi/4)
      -0.0411