aboutsummaryrefslogtreecommitdiff
path: root/pkg/xtools/doc/extrema.hlp
blob: cea82502456799419d15789b6695842cc75ca864 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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