I can generate a Voigt profile by convolving a Lorentzian and Gaussian line shape using the Matlab conv command. If the Lorentzian and Gaussian line shapes are zero-based, then this works great. But if I have an offset in the x-axis, then that offset gets doubled in the convolution. Here is the code:
clear; close all; lwid = 1; gwid = 10; fzer = -10; fi = linspace(-100,100,10001); y1 = (((fi - fzer)./lwid).^2 + 1).^(-1); y2 = exp(-(fi-fzer).^2 ./ (2*gwid^2)); y3 = conv(y1,y2); x3 = linspace(2*min(fi),2*max(fi),2*length(fi)-1); y3 = y3 ./ max(y3); plot(fi,y1,fi,y2,x3,y3);
The convolution y3 has a "center" frequency at twice fzer. Apparently this can be avoided if you only offset ONE of either the Lorentzian or Gaussian profiles.
Best Answer