PLS_Toolbox Documentation: peakidtext | < peakgaussian | peaklorentzian > |
peakidtext
Purpose
Writes peak ID information on present graph of a set of peaks.
Synopsis
h = peakidtext(peakdef)
Description
When a set of peaks is plotted, PEAKIDTEXT can be used to put the peak id (peakdef.id) on the graph (see PEAKSTRUCT). For example, if (ax) is the wavelength, frequency, or time axis and (y) is a set of peaks then, for an initial guess given in (peakdef) the fit parameters are obtained using:
peakdefo = fitpeaks(peakdef,y,ax);
A plot can be made using:
plot(ax,y,'b',ax,peakfunction(peakdefo,ax),'r')
Next, labels are put on the graph using:
peakidtext(peakdefo)
This also puts a vertical line at the peak center and puts the text label, based on the contents of the (peakdefo.id) field, near the peak maximum.
INPUT:
OUTPUT:
See Also
< peakgaussian | peaklorentzian > |