Peakstruct

From Eigenvector Documentation Wiki
Jump to: navigation, search

Contents

Purpose

Makes an empty standard peak definition structure.

Synopsis

peakdef = peakstruct(fun,n)

Description

The output of PEAKSTRUCT is an empty standard peak structure, or multi-record peak structure.

No input is required. Optional inputs can be used to create different types of default peak definitions in each of the structure records.

Optional Inputs

  • fun = Peak function name {default = 'Gaussian'}. Available peak names (shapes) are:
  • 'Gaussian', 'Lorentzian', 'PVoigt1', and 'PVoigt2'.
  • n = Number of records to include in the (peakdef) structure.

Outputs

  • peakdef = A structure array with the following fields:
  • name: 'Peak', indentifies (peakdef) as a peak definition structure.
  • id: integer or character string peak identifier.
  • fun: peak function name {e.g.'Gaussian'}.
  • param: vector of parameters for each peak function:
  • fun = 'Gaussian'; param = [height, position, width].
  • fun = 'Lorenzian'; param = [height, position, width].
  • fun = 'PVoigt1'; param = [height, position, width, fraction Gaussian], where 0 fraction Gaussian 1.
  • fun = 'PVoigt2'; param = [height, position, width, fraction Gaussian], where 0 fraction Gaussian 1.
  • Descriptions of the functions and parameters are given in the Algorithm section of the FITPEAKS entry in the reference manual. Also see PEAKFUNCTION.
  • lb: vector of lower bounds on (.param).
  • penlb: vector of penalties for lower bounds. If an entry is 0, then the corresponding lower bound is not active.
  • ub: vector of upper bounds on (.param).
  • penub: vector of penalties for upper bounds. If an entry is 0, then the corresponding upper bound is not active.

Examples

peakdef = peakstruct(,3);
disp(peakdef(2))
peakdef(2) = peakstruct('PVoigt1');
peakdef(2).id = '2: Voigt';
disp(peakdef(2))

See Also

fitpeaks, peakfunction, peakgaussian, peaklorentzian, peakstruct, peakpvoigt1, peakpvoigt2

Views
Personal tools