islocalmin
Find local minima
Syntax
Description
returns a logical array whose elements are 1 (TF
= islocalmin(A
)true
) when a local
minimum is detected in the corresponding element of A
.
You can use islocalmin
functionality interactively by adding
the Find Local
Extrema task to a live script.
specifies parameters in addition to any of the input argument combinations in
previous syntaxes for finding local minima using one or more name-value arguments.
For example, TF
= islocalmin(___,Name,Value
)islocalmin(A,'SamplePoints',t)
finds local minima of
A
with respect to the time stamps contained in the time
vector t
.
[
also returns the prominence corresponding to each element of TF
,P
] = islocalmin(___)A
.
Examples
Input Arguments
Name-Value Arguments
Output Arguments
Algorithms
islocalmin
identifies all local minima (or valleys) in the input
data and follows these steps to compute the prominence of each local minimum. The
prominence of a local minimum measures how the valley stands out with respect to its
height and location relative to other valleys.
Draw a horizontal line to the left and right from the current valley. Stop drawing each segment of the horizontal line when it reaches the edge of the data or intersects the data.
Identify the peaks above the horizontal line.
Use the lowest of those peaks as the basis value. The prominence is the absolute difference between the height of the current local minimum and the basis value.
Alternative Functionality
Live Editor Task
You can use islocalmin
functionality interactively by adding
the Find Local
Extrema task to a live script.