Peakidtext

From Eigenvector Research Documentation Wiki
Revision as of 15:26, 3 September 2008 by imported>Jeremy (Importing text file)
Jump to navigation Jump to search

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.

See Also

fitpeaks, peakfunction, peakstruct