lorentzian
Synopsis

Lorentzian line shape (absorption and dispersion).

ya = lorentzian(x,x0,fwhm)
ya = lorentzian(x,x0,fwhm,diff)
ya = lorentzian(x,x0,fwhm,diff)
[ya,yd] = ...
Description

This function returns a Lorentzian lineshape with center x0 and full width at half height fwhm over the abscissa values defined in the vector x.

It returns the absorption Lorentzian in ya and the dispersion Lorentzian in yd.

diff determines the derivative to compute. 0 stands for no derivative, 1 is the first one, 2 the second one, -1 indicates the integral with [eqn] as lower limit. If diff is not given, it is set to 0 by default.

Examples

To obtain the first derivative of a Lorentzian with centre at 2 and FWHM of 18, use

x = linspace(-300,300,1e3); x0 = 2; w = 18;
y = lorentzian(x,x0,w,1);
plot(x,y);

The Lorentzian absorption shape is normalised, so the double integral of y should give one. However, since its wings extend much beyond the borders of the above defined abscissa x, the value 1 is not reached.

trapz(x,cumtrapz(x,y))
ans =
    0.9621
See also

convspec, gaussian, lshape, voigtian