Peakpvoigt2: Difference between revisions

From Eigenvector Research Documentation Wiki
Jump to navigation Jump to search
imported>Jeremy
(Importing text file)
imported>Jeremy
(Importing text file)
Line 12: Line 12:
Given a 4-element vector of parameters (x) and a  vector of independent variables e.g. a wavelength or frequency axis (ax), PEAKPVOIGT2 outputs a pseudo-voigt peak (y). If more than one output is requested, it also outputs the Jacobian (y1) and Hessian (y2). Derivatives are with respect to the parameters and are evaluated at (x). This function is called by PEAKFUNCTION.
Given a 4-element vector of parameters (x) and a  vector of independent variables e.g. a wavelength or frequency axis (ax), PEAKPVOIGT2 outputs a pseudo-voigt peak (y). If more than one output is requested, it also outputs the Jacobian (y1) and Hessian (y2). Derivatives are with respect to the parameters and are evaluated at (x). This function is called by PEAKFUNCTION.


====INPUTS====
====Inputs====


* '''x''' = 4 element vector with parameters
* '''x''' = 4 element vector with parameters
Line 26: Line 26:
* '''ax''' =  vector of independent variables e.g. a wavelength or frequency axis with elements  ,  .
* '''ax''' =  vector of independent variables e.g. a wavelength or frequency axis with elements  ,  .


====OUTPUTS====
====Outputs====


* '''y''' =  vector with the Lorentzian function,  .
* '''y''' =  vector with the Lorentzian function,  .

Revision as of 16:34, 3 September 2008

Purpose

Outputs a pseudo-Voigt function, Jacobian, and Hessian for a given set of input parameters and axis.

Synopsis

[y,y1,y2] = peakpvoigt2(x,ax);

Description

Given a 4-element vector of parameters (x) and a vector of independent variables e.g. a wavelength or frequency axis (ax), PEAKPVOIGT2 outputs a pseudo-voigt peak (y). If more than one output is requested, it also outputs the Jacobian (y1) and Hessian (y2). Derivatives are with respect to the parameters and are evaluated at (x). This function is called by PEAKFUNCTION.

Inputs

  • x = 4 element vector with parameters
  • x(1) = coefficient ,
  • x(2) = mean ,
  • x(3) = spread , and
  • x(4) = fraction Gaussian .
  • ax = vector of independent variables e.g. a wavelength or frequency axis with elements , .

Outputs

  • y = vector with the Lorentzian function, .
  • y1 = matrix of the Jacobian of evaluated at (x).
  • y2 = matrix of the Hessian of evaluated at (x).

Algorithm

The function is


Examples

%Make a single known peak
ax = 0:0.1:100;
y = peakpvoigt2([2 51 8 0.5],ax)
plot(ax,y)

See Also

peakfunction, peakgaussian, peaklorentzian, peakpvoigt1, peakstruct