Differentiate a Curve (Generate menu) JR   Viewer

Three methods are available for differentiating (finding the derivative of) a curve. Typical uses for differentiating a curve include generating a velocity-time history from a displacement-time record, or pressure-time from impulse-time. The "Curve(s) to operate on" box contains a list of all curves with the minimum requirements: 2 or more points, and monotonically increasing X values. If only one curve exists or meets those requirements, it is selected and the "Curve(s) to operate on" list is disabled.

If your curves are not sorted in increasing X order and it is appropriate to do so, you may use the Sort command on the Edit menu so that those curves may be operated on by this command.

Central Difference

This method sets the output amplitude equal to the slope between the previous and next data points. For the first and last data points in the curve, the code uses the slope between the given point and the previous (for the last point) or next (for the first point) data point.

This method gives results approaching the quadratic interpolation with small differences in spacing, and increasingly poor results for larger variations in spacing.

This method requires that the input data have a constant spacing. (If you select this option for a curve that does not have evenly-spaced points, then the Central Difference method will automatically be used.) DPlot uses a quadratic interpolating function that fits the amplitude at a given X plus its nearest two neighbors and sets the derivative at this X equal to the slope of the interpolating function.

Previous point

Very similar to "Central Difference", but uses the previous point and the current point (rather than the next point). The output for the first data point will use the first and second data points. Therefore the output amplitude at the first and second points will always be identical.

This method might be useful for (among other things) rainfall intensity plots.

Replace existing curves

If checked, the source curve will be replaced with the output of this function. If unchecked, this function creates a new curve for every source curve.

Legend

If the source curve has a legend entry, the output curve will have a legend of "/x(<source legend>)".

Related macro commands

Differentiate

____________________________