Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2008

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Lorentzian on a baseline

  • To: mathgroup at smc.vnet.net
  • Subject: [mg89218] Re: Lorentzian on a baseline
  • From: dh <dh at metrohm.ch>
  • Date: Thu, 29 May 2008 07:06:51 -0400 (EDT)
  • References: <g1j6g0$qne$1@smc.vnet.net>


Hi Fred,

I think you have a problem with local minimas. Therefore, you must give 

reasonable starting values for m1,m2 or a better starting value for m3. 

E.g. a start value for m3 can easiliy be found by looking at the data 

plot. Here is an example:

fun[x_,m1_,m2_,m3_]=m1-m2/((x-m3)^2+m2^2);

dat=Table[{x,fun[x,0.5,2,220]},{x,200,250}];



sol=fun[x,m1,m2,m3]/.FindFit[dat,m1-m2/((x-m3)^2+m2^2),{{m1,0.5},{m2,2},{m3,250}},x,MaxIterations->10000]



Plot[{sol,fun[x,0.5,2,220]},{x,200,250}]

strating value for

m30 fails

m1=210,220,240 o.k.

m=250 fails

hope this helps, Daniel



fred.engles at gmail.com wrote:

> I'm trying to fit a Lorentzian subtracted from a constant baseline,

> using findfit.

> 

>  FindFit[rawdata, m1 - m2/((x - m3)^2 + m2^2), {m1, m2, {m3, 250}}, x,

>   MaxIterations -> 10000]

> 

> Isn't working - either a totally flat horizantal line, or the

> subtracted 'Lorentzian' looks almost delta-function sharp. Help?

> Thanks!

> 

> P.S. Does Experimental Data Analyst work with 6.0.1 (Mac)?

> 





-- 



Daniel Huber

Metrohm Ltd.

Oberdorfstr. 68

CH-9100 Herisau

Tel. +41 71 353 8585, Fax +41 71 353 8907

E-Mail:<mailto:dh at metrohm.com>

Internet:<http://www.metrohm.com>




  • Prev by Date: Re: simplify polynomial
  • Next by Date: Re: NIntegrate
  • Previous by thread: Re: Lorentzian on a baseline
  • Next by thread: simplify polynomial