Standard Library function thatcalculates the first derivative of a function in x and y.
y The vector of dependent y-coordinates at which the derivative of function f is evaluated. Must be a one-dimensional array (a vector).
NOTE: DERIV does not support complex numbers.
The vector of x-coordinates, x, is optional. The conditions set on this vector are given below:
x = FINDGEN(10) xx = x^2 d = DERIV(xx) PRINT, d PLOT, xx OPLOT, d, Linestyle=2
x = FINDGEN(100) * 10 * !Dtor
sin_x = SIN(x) d_sin_x = DERIV(x, sin_x) PLOT, sin_x OPLOT, d_sin_x, Linestyle=2