FindNearestMinima: Find Nearest Minima

FindNearestMinimaR Documentation

Find Nearest Minima

Description

Finds the nearest minima to the left and the right of the specified peak. Peaks can be found with FindAllPeaks.

Usage

FindNearestMinima(inSignal, inPeakIndex)

Arguments

inSignal

the index of the nearest miminum to the left of the peak if no real minimum was found, 1 is returned.

inPeakIndex

the index of the nearest miminum to the right of the peak. If no real minimum was found, length(inSignal) is returned.

Value

A list of two elements:

LeftIndex

the index of the nearest miminum to the left of the peak. If no real minimum was found, 1 is returned.

RightIndex

the index of the nearest miminum to the right of the peak. If no real minimum was found, length(inSignal) is returned.

Author(s)

Marc Vidal (R version). Based on the original code from IPEM Toolbox.


m-vidal/eaR documentation built on Nov. 18, 2022, 3:55 p.m.