Lorentzian line shape.
y = lorentzian(x,x0,fwhm) y = lorentzian(x,x0,fwhm,diff)
This function returns a Lorentzian lineshape with centre x0
and full width
at half height fwhm
over the abscissa values defined in the
vector x
.
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 as lower limit. If
diff
is not
given, it is set to 0 by default.
For the definition of the Lorentzian function used see lshape.
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
convspec, gaussian, lshape, voigtian