PLS_Toolbox Documentation: localmax | < lmoptimizebnd | logdecay > |
localmax
Purpose
Automated identification of local maxima
Synopsis
i0 = localmax(x,w)
Description
Finds maxima in windows of width (w). Wider windowing is used to avoid local maxima that might be due to noise. The default window width is w=3. This function is called by PEAKFIND.
INPUT:
OPTIONAL INPUT:
OUTPUT:
Examples
load nir_data
plot(spec1.axisscale{2},spec1.data(1,:))
i0 = localmax(spec1.data(1,:));
vline(spec1.axisscale{2}(i0{1}))
i0 = localmax(spec1.data(1,:),5);
vline(spec1.axisscale{2}(i0{1}),'r')
See Also
< lmoptimizebnd | logdecay > |