local_maxima: Find local maxima in a vector of real values.

Description Usage Arguments Value Examples

View source: R/various.R

Description

Find local maxima in a vector of real values.

Usage

1

Arguments

x

A vector of real numbers

Value

A vector of integers corresponding to local maxima positions in vector x

Examples

1
2
3
t <- seq(-10,10,length=1000)
x <- dnorm(t,mean=3)+dnorm(t,mean=7)
yM <- local_maxima(x)

crone documentation built on Aug. 24, 2019, 5:03 p.m.