Peaks

Description

The peaks function returns a dataset containing indices of peaks found using width and minht as a criteria. width is the number of points on either side of the test point (and is treated as an integer) and minht is in Y axis units. A peak at a given index i is minht greater than the data value at i-width or i+width.

Syntax

dataset peaks(dataset vd, int width, double minht)

Parameter

vd

a dataset, a range or column in Origin worksheet in which you want to find peak information.

width

the number of points on either side of the test point to take into account when determines a peak.

minht

the difference of height between the peak center data point with index i and the point at i-width or i-width.

Return

Returns a dataset containing indices of peaks found in vd.

Examples

With a worksheet active

col(Peak Indices) = peaks(col(B), 3, 9); // Columns are referenced by name

With a graph active

Peaks_Index = peaks(%C, 5, Y1 + .4 * (Y2 - Y1)); // %C is the active plot curve

Using Range notation

range rr1 = [Peaks]Sheet1!Index;
range rr2 = [Book1]"Sheet1"!B;
rr1 = peaks(rr2, 4, 10);