functions:DERIV
syntax: DERIV( x, y )
DERIV( x, y, `SMOOTH' )
Cubic splines, which may not pass through the data points, are
used. The spline tension will be the current value of TENSION,
which may be changed with the SET command. A tension of 0 gives
the loosest splines, while a large tension gives linear
interpolation. The default tension is 1.
syntax: DERIV( x, y, `INTERP' )
Cubic splines, which always pass through the data points, are
used. The spline tension will be the current value of TENSION,
which may be changed with the SET command. A tension of 0 gives
the loosest splines, while a large tension gives linear
interpolation. The default tension is 1.
syntax: DERIV( x, y, `LAGRANGE3' )
DERIV( x, y, `LAGRANGE5' )
DERIV( x, y, `LAGRANGE7' )
DERIV( x, y, `LAGRANGE9' )
The derivatives are calculated using the method of Lagrange
interpolating polynomials. The order of the polynomials can be
3, 5, 7, or 9.
syntax: DERIV( x, y, `FC' )
The derivatives are calculated using the Fritsch and Carlson
method of monotone piecewise cubic interpolation. This algorithm
produces a visually pleasing interpolant, that is, the
interpolating curve has no extraneous `bumps' or `wiggles'.
Suppose you need the derivatives, from 0 to pi, of
cos(x)^3+sin(x)^4 The following commands could be used:
X = [0:PI:.1]
YINT = DERIV(X,COS(X)^3+SIN(X)^4,`LAGRANGE5')