Rank: 31675 based on 0 downloads (last 30 days) and 0 files submitted
photo

Eric Zilli

E-mail

Personal Profile:
Professional Interests:

 

Watch this Author's files

 

Comments and Ratings by Eric
Updated File Comments Rating
19 May 2009 lorentzian fit In the attached file example i use "nlinfit", which can fit any kind of function that you want. the Author: Yohanan Sivan

Not terribly useful. This is an example, not a fitting function and it is not very well written. It is, however, slightly more useful than the poor documentation on the function nlinfit.

The code does not seem to be performing a fit to a Lorentzian, though, as the function fun.m (why not give it a more useful name?) is multiplied by 2 for some reason and the (x-x_0) term in the denominator is multiplied by 4 for some reason. Possibly this is a standard form in some field I have never come across, but this is certainly not the Lorentzian function I am interested in fitting. It is easy enough to fix, but worth pointing out to others who might use this.

Contact us at files@mathworks.com