DERIV Function
Standard Library function that
calculates the first derivative of a function in x and y.
Usage
Input Parameters
Returned Value
Keywords
Discussion
NOTE: DERIV does not support complex numbers.
- If you specify x, then both x and y must be one-dimensional and have the same number of elements. Selecting this option allows you to define the spacing along the x-axis, for the case where the independent data is not monotonically increasing.
- If you don't specify x, then it is automatically provided with even spacing, using a unit of one, along the x-axis. (In other words, x(i) = i, where i = 0, 1, 2, 3, ... n.)
Example 1
x = FINDGEN(10)
xx = x^2
d = DERIV(xx)
PRINT, d
PLOT, xx
OPLOT, d, Linestyle=2
Example 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
See Also


doc@boulder.vni.com
Copyright © 1999, Visual Numerics, Inc. All rights
reserved.