islocalmax2
Description
specifies options for finding local maxima using one or more name-value arguments. For
example, TF = islocalmax2(A,Name=Value)TF = finds
no more than four of the most prominent local maxima.islocalmax2(A,MaxNumExtrema=4)
[
also returns the prominence corresponding to each element of TF,P] = islocalmax2(A,___)A for either
of the previous syntaxes. For more information about the prominence calculation, see Algorithms.
Examples
Input Arguments
Name-Value 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
ProminenceWindowname-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








