smoothMiner (version 0.1-10)

locmax: estimate locations of local maxima

Description

estimate locations of local maxima

Usage

locmax(x, t)

Arguments

x
series of function values to be searched
t
domain values (same length as x)

Value

  • a list with elements inds (indices for local max values) and dom (domain values)

Details

uses diff, looks at boundaries

Examples

Run this code
X = seq(-pi,pi,.01)
locmax(sin(X),X)
locmax(cos(X+pi),X+pi)

Run the code above in your browser using DataLab