Home > Scripts > Models > bilorz.m



y = bilorz(p, x, [y]) : Bi-Lorentzian


function y=bilorz(varargin)


 y = bilorz(p, x, [y]) : Bi-Lorentzian

   iFunc/bilorz Bi-Lorentzian fitting function
     y = p(1)*exp(-0.5*((x-p(2))/s).^2) + p(5);
   where s = p(3) for x < p(2) and s = p(4) for x > p(2).

 bilorz([ w1 w2])       creates a model with specified widths
 bilorz([ parameters ]) creates a model with specified model parameters

 input:  p: Bi-Lorentzian model parameters (double)
            p = [ Amplitude Centre HalfWidth1 HalfWidth2 BackGround ]
          or 'guess'
         x: axis (double)
         y: when values are given and p='guess', a guess of the parameters is performed (double)
 output: y: model value
 ex:     y=bilorz([1 0 1 1], -10:10); or plot(bilorz)

 Version: Aug. 22, 2017
 See also iFunc, iFunc/fits, iFunc/plot
 (c) E.Farhi, ILL. License: EUPL.


This function calls: This function is called by:
Generated on Tue 22-Aug-2017 11:03:30 by m2html © 2005. iFit (c) E.Farhi/ILL EUPL 1.1