Hi,
I would like to plot a graph to how the deconvolution of an FTIR spectrum. I've fitted the peaks with a separate program and I have the peak information for the individual peaks (hwhm, position and height).
There doesn't seem to be a simple lorentzian function on matlab as far as I can see?
Note: I am not trying to fit any data, I'm trying to plot stand alone lorentzian peaks to break down a spectrum.
I'm made the following function:
function y = lorentz(x, pos, h, H)
num = H*0.5;
den = ( x - pos ).^2 + (0.5 * H).^2;
y = h* num*(den.^-1)*(pi).^1;
end
and used the following code to plot it:
x = linspace (3100, 3700, 1000);
pos = 3624;
h = 0.7945223;
H = 2.003005*2;
d = lorentz(x, pos, h, H);
plot(x, d)
But the height of the function is not the correct height.