DADiSP Worksheet Functions > Function Categories > Statistics and Calculus > LDERIV

 

LDERIV

Purpose:

Calculates the derivative of a series or series expression using a left-to-right slope algorithm.

Syntax:

LDERIV(series, method)

series

-

An interval or XY series, the series to differentiate.

method

-

Optional. An integer, the first point calculation method. Defaults to 0.

0:

first point = s[1]/deltax(s)

1:

first point = (s[2]-s[1])/deltax(s)

Returns:

A series or table.

Example:

W1: 2..5

W2: lderiv(W1)

W3: lderiv(W1, 1)

 

W2 == {2, 1, 1, 1}

W3 == {1, 1, 1, 1}

 

W2 and W3 compute the left derivative of the series {2, 3, 4, 5}. The results are identical except for the first point.

Example:

W1: 2..5;setdeltax(1/10)

W2: lderiv(W1)

W3: lderiv(W1, 1)

 

W2 == {20, 10, 10, 10}

W3 == {10, 10, 10, 10}

 

Same as above except the results are multiplied by the inverse of the DELTAX.

Remarks:

LDERIV computes the 2 point derivative of series s as follows:

 

image\lderiv01.gif

 

For method == 0 (default), the data is assumed to be zero before the first sample, thus the derivative at the first point is computed as:

 

 

 

 

For method == 1,

 

 

 

 

The method 1 first point treatment generally results in a smaller start point discontinuity when the start point of the input data is not near zero.

 

See RDERIV to compute the 2 point right derivative.

 

See DERIV to compute the derivative using a quadratic polynomial.

 

See DIFF to compute the series difference.

See Also:

DERIV

DIFF

DYDX

INTEG

RDERIV