MathGroup Archive 2004

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

Search the Archive

Re: NonlinearFit problem

The algorithm uses model's first or second derivatives, and in your case the partial derivative in respect to a is not numerical at r=0 because the Log[r]-function.

D[ r^a Exp[-b r], a] = e^(-b r) r^a Log[r]
D[ r^a Exp[-b r], {a, 2}] = e^(-b r) r^a Log[r]^2

If you change your first datapoint to something like {0.0000001, 1.00002} instead of {0, 1.00002} the fit has no problems.

   Antti Penttilä       Antti.I.Penttila at
     Researcher                     Observatory
tel. +358 50 5240968        00014 University of Helsinki

  • Prev by Date: Re:A NIntegrate question
  • Next by Date: Adding text labels and such to 3D plots?
  • Previous by thread: Re: NonlinearFit problem
  • Next by thread: Re: NonlinearFit problem