MathGroup Archive 2009

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

Search the Archive

Re: Constrain independent variable in FindFit?

  • To: mathgroup at
  • Subject: [mg95514] Re: Constrain independent variable in FindFit?
  • From: dh <dh at>
  • Date: Tue, 20 Jan 2009 05:49:19 -0500 (EST)
  • References: <gkscde$edf$>

Hi Pascal,

you write that there is little agreement between the data and the model 

at early times. Well, simply eliminate the data for early times.

hope this helps, Daniel

mickelsp at wrote:

> Hello.


> I am trying to fit two sets of data (two different quantities, both as 

> a function of time), whose models share common parameters, in a manner 

> similar to this MathGroup post:



> I am using the FindFit commmand, and I already successfully specify 

> initial values of the input parameters (I can also constrain them, but 

> am not doing so currently).  However, my model is ill-behaved for 

> early times, and the error from the early times outside my range of 

> interest prevents convergence to good parameter values.  To avoid the 

> ill-behaved time values and achieve convergence, I would like to limit 

> the search for the fit to a particular range of times (say, t0 to t1). 

>   Is it possible to constrain the range of independent variable values 

> for the FindFit function's search?


> My FindFit function looks something like this:

> FindFit[newdat, {err[t]}, {{Gamma, 1}, {N0, 2*10^6}}, t],

> where 'newdat' and 'err[t]' are basically as they are in the 

> aforementioned post except that 'newdat' begins at t=t0 instead of t=0 =


> and 'err[t]' has been weighted by the uncertainties in my data.


> I've already looked through Mathematica's documentation and through 

> MathGroup archives without much return.  Hopefully someone can provide 

> guidance.  Thanks.

> --

> Pascal



> Pascal Mickelson

> mickelsp at


  • Prev by Date: Re: Torus radii & Meshes
  • Next by Date: Formatting in text cells ...
  • Previous by thread: Constrain independent variable in FindFit?
  • Next by thread: Re: Parallel computing with Mathematica 7?