function lorentz_out=lorentz(wave,wave0,amplitude,fwhm) % Syntax: lorentz_out=lorentz(wave,wave0,amplitude,fwhm) % where wave is a vector of positions, % wave0 is a scalar denoting the centre position of the Gaussian. % amplitude is a scalar denoting the 'amplitude' of the Gaussian, % fwhm is a scalar denoting the FWHM of the Gaussian, and % lorentz_out is a output vector of the same dimension as wave. % % This function returns a Lorentzian profile vector with the % parameters given by the input. lorentz_out=amplitude* (fwhm/(2*pi))*((wave-wave0).^2+(fwhm/2)^2).^(-1);