Determines all local maxima from a real valued vector.
Usage
amax(x)
Arguments
x
numeric vector
Value
returns the indicies of local maxima. If x[1] = max, then
it is ignored.
Details
The purpose is to detect all local maxima in a real valued 1D vector.
If the first element x[1] is the global maximum, it is ignored,
because there is no information about the previous element. If there
is a plateau, the first edge is detected.