DERIV

The DERIV function performs numerical differentiation using 3-point, Lagrangian interpolation and returns the derivative.

Calling Sequence

Result = DERIV( [X,] Y )

Arguments

X

The variable to differentiate with respect to. If omitted, unit spacing for Y (i.e., X i = i ) is assumed.

Y

The variable to be differentiated.

Example

X = [ 0.1, 0.3, 0.4, 0.7, 0.9]

Y = [ 1.2, 2.3, 3.2, 4.4, 6.6]

PRINT, DERIV(Y)

IDL prints:

1.20000 1.00000 1.05000 1.70000 2.70000

PRINT, DERIV(X,Y)

IDL prints:

8.00000 6.66667 5.25000 6.80000 10.800

See Also

DERIVSIG