islocalmax2
Description
[
also returns the prominence corresponding to each element of TF
,P
] = islocalmax2(A
)A
. For more
information about the prominence calculation, see Algorithms.
___ = islocalmax2(
specifies options for finding local maxima using one or more name-value arguments with
either of the output argument combinations in the previous syntaxes. For example,
A
,Name=Value
)TF =
finds no more
than four of the most prominent local maxima.islocalmax2
(A,MaxNumExtrema=4)
Examples
Input Arguments
Output Arguments
Algorithms
islocalmax2
identifies all local maxima in the input data and follows
these steps to compute the prominence of each local maximum:
Determine the data to use to compute the prominence.
If the
ProminenceWindow
name-value argument is specified, use its value to draw a rectangular window of data around the current local maximum. Otherwise, use a rectangular window that includes all of the data.
Determine the prominence box.
Move vertical lines left and right from the current maximum until encountering a higher maximum or the edge of the rectangular window.
Move horizontal lines up and down from the current maximum until encountering a higher maximum or the edge of the rectangular window.
Compute the prominence.
Divide the prominence box into four quadrants centered on the current local maximum.
Identify the lowest value within each quadrant.
Use the highest of these quadrant minimum values as the basis value. The prominence is the absolute difference between the height of the current local maximum and the basis value.
Version History
Introduced in R2024a