Peakidtext

From Eigenvector Documentation Wiki
Jump to: navigation, search

Contents

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

Views
Personal tools