Peakidtext: Difference between revisions
Jump to navigation
Jump to search
imported>Jeremy (Importing text file) |
imported>Jeremy (Importing text file) |
||
Line 24: | Line 24: | ||
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. | 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. | ||
==== | ====Inputs==== | ||
* '''peakdef''' = a standard peak structure (see PEAKSTRUCT). | * '''peakdef''' = a standard peak structure (see PEAKSTRUCT). | ||
==== | ====Outputs==== | ||
* '''h''' = vector of handles corresponding to the individual text labels. | * '''h''' = vector of handles corresponding to the individual text labels. |
Latest revision as of 17:34, 3 September 2008
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.
Inputs
- peakdef = a standard peak structure (see PEAKSTRUCT).
Outputs
- h = vector of handles corresponding to the individual text labels.