Testfitpeaks

From Eigenvector Research Documentation Wiki
Jump to navigation Jump to search

Purpose

Demo calls to the FITPEAKS function.

Synopsis

[peakdef,fval,exitflag,output] = testfitpeaks(test)

Description

TESTFITPEAKS is a set of example calls to FITPEAKS. Editing this M-file provides some insight into how the peak fitting utilities can be used.

No input is required.

Optional Inputs

  • test = calls different peak fitting examples.
  • test = 1 fits a single Gaussian peak.
  • test = 2 fits two Gaussian peaks.
  • test = 3 fits a single Lorentzian peak.
  • test = 4 fits two Lorentzian peaks.
  • test = 5 fits a Gaussian and Lorentzian peak.
  • test = 6 fits a single PVoigt2 peak.
  • test = 7 fits a Gaussian and a PVoigt2 peak.
  • test = 8 fits a Gaussian and a PVoigt1 peak.
  • test = 9 fits a single PVoigt1 peak.

Outputs

  • peakdef = The input peak structure (peakdef) with parameters changed to correspond to the best fit values.
  • fval = Scalar value of the objective function evaluated at termination of FITPEAKS.
  • exitflag = Describes the exit condition (see LMOPTIMIZEBND).
  • out = Structure array with information on the optimization/fitting (see LMOPTIMIZEBND).

See Also

fitpeaks, peakfunction, peakstruct