aboutsummaryrefslogtreecommitdiff
path: root/pkg/xtools/doc/extrema.hlp
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/xtools/doc/extrema.hlp')
-rw-r--r--pkg/xtools/doc/extrema.hlp27
1 files changed, 27 insertions, 0 deletions
diff --git a/pkg/xtools/doc/extrema.hlp b/pkg/xtools/doc/extrema.hlp
new file mode 100644
index 00000000..cea82502
--- /dev/null
+++ b/pkg/xtools/doc/extrema.hlp
@@ -0,0 +1,27 @@
+.help extrema Dec83 xtools
+.ih
+NAME
+extrema -- find the extrema in an array of x and y points
+.ih
+SYNOPSIS
+.nf
+nextrema = extrema (x, y, curvature, npts, dx)
+
+real x[npts], y[npts] # Input data points and output extrema
+real curvature[npts] # 2nd deriv. of cubic spline at extrema
+int npts # Number of input data points
+real dx # Precision of extrema positions
+.fi
+.ih
+DESCRIPTION
+The input data points are fitted with a cubic interpolation spline. The
+spline is then searched for points where the first derivative changes sign.
+The minimum step size of this search is controlled by the parameter dx.
+The positions of these extrema are returned in the x array, the value of the
+spline at the extrema are returned in the y array, and the curvature or
+second derivative of the spline at the extrema are returned in the
+curvature array. The function returns the number of extrema found.
+.ih
+SEE ALSO
+xtools.peaks
+.endhelp