localmax
Identify and chain local maxima
Syntax
Description
Examples
Input Arguments
Output Arguments
Algorithms
localmax determines the value of
lmaxima at a local maximum in row R as follows.
If
R>initRow, the value oflmaximaat a local maximum is 1.If
R=initRow, the value oflmaximaat a local maximum is the column index in row R.If
R<initRow, the value oflmaximaat a local maximum in row R is the column index of the nearest local maximum in rowR+1.To illustrate this, if
xis:3 2 5 3 4 6 3 2 4 4 7 4 4 6 2 2
lmaximawithinitRow = 4andregflag = falseis:0 0 2 0 0 3 0 0 0 0 2 0 0 2 0 0lmaximawithinitRow = 3andregflag = falseis:0 0 2 0 0 3 0 0 0 0 3 0 0 1 0 0If the local maximum in row R lies between two local maxima in row
R+1, the value of the local maximum in row R is the higher column index in rowR+1.To illustrate this, if
xis:0 0 1 0 0 0 0 1 0 1 0 0lmaximawithinitRow = 2andregflag = falseis:0 0 4 0 0 0 0 2 0 4 0 0lmaximawithinitRow = 1andregflag = falseis:0 0 3 0 0 0 0 1 0 1 0 0
Version History
Introduced in R2008a
See Also
fminbnd | fminsearch | fzero | islocalmax | islocalmin | max | findpeaks (Signal Processing Toolbox) | refinepeaks (Signal Processing Toolbox) | wtmm
Topics
- Peak Analysis (Signal Processing Toolbox)
- Find Peaks in Data (Signal Processing Toolbox)

