Code covered by the BSD License  

Highlights from
TOFsPRO toolbox

from TOFsPRO toolbox by Dariya Malyarenko
Signal processing for time-of-flight mass spectra over the broad m/z range (1-200 kDa)

lorf (x, x0, tau)
function lfx = lorf (x, x0, tau)

%----------------------------------------------------
% Compute a Lorentzian
%
% INPUT:
% x - variable axis;
% x0 - location of maximum
% tau - lorentzian attenuation constant;
%
% OUTPUT:
% lfx - Lorentian function of x;
%
% USAGE:
% lfx = lorf (x, x0, tau);
% Dependency: none
%

if (nargin < 2) | (nargin < 1)
  error('Requires observed signal, and apodization width as an input');
  aps = NaN;
end;

lfx=tau./(1+((x-x0)*tau).^2);

return;

Contact us at files@mathworks.com