powered by
Get the indices of the local minima in a list of numbers
local_minima(x)
A vector containing the indices of the elements that are local minima in the given input.
Vector of numbers.
local_minima(c(1, 5, 3, 2, 4, 3))
Run the code above in your browser using DataLab