Localmax: Difference between revisions

From Eigenvector Research Documentation Wiki
Jump to navigation Jump to search
imported>Scott
imported>Donal
(Replaced content with "=== NOTE === Obsolete: See localmaxima.")
Line 1: Line 1:
=== Purpose ===
=== NOTE ===


 
Obsolete: See [[localmaxima]].
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.
 
====Inputs====
 
* '''x''' =  matrix of measured traces containing peaks each  row of (x) is an individual trace.
 
====Optional Inputs====
 
* '''w''' = odd scalar window width for determining local maxima {default: w = 3}.
 
====Outputs====
 
* '''i0''' =  cell w/ indices of the location of the major peaks for each of the  traces in each cell.
 
===Examples===
 
<pre>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')</pre>
 
===See Also===
 
[[fitpeaks]], [[peakfind]]

Revision as of 12:45, 13 January 2015

NOTE

Obsolete: See localmaxima.