DIFFERENTIATE

Returns the derivative at each input point on curve C. To compute the derivative at each point, the DIFFERENTIATE function fits a cubic spline to a 2xN matrix representation of curve C and returns the derivatives of the approximating polynomials at each point. The curve of derivatives that DIFFERENTIATE returns has the same x values as curve C.

Format

DIFFERENTIATE (C)

Argument

 
C
Input curve.

Example

The following xy_plot command creates a curve, diff1, whose x values are the same as the x values of curve1 on plot1:
xy_plots curve create curve=diff1 &
   x_values=(.plot1.curve1.x_data.values) &
   y_values=(DIFFERENTIATE({.plot1.curve1.x_data.values, &
   .plot1.curve1.y_data.values})[2,*])
The matrix that DIFFERENTIATE receives is 2xN:
The first row has the x values of curve1.
The second row has the y values of curve1.
DIFFERENTIATE returns two rows:
The first is the same as the x values of curve1.
The second is the derivatives of curve1.