MathGroup Archive 1998

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

Search the Archive

No Subject

I'm having a problem working with NonLinearFit, and would like some
advice. To demonstrate the problem, I'll use a very simple expression,
y==a*x^c +b, where I have assigned a=3, b=7, and c=2.

This generates a simple data set:
data=Table[{x, 3*x^2+7 +5*Random[]},{x,0,4,.2}];

Now I try to use NonLinearFit.  If I specify the value of the exponent,
"c", the  routine seems to work. If I ask it to find a value of c, it
chokes, even if I tell it the right answer:


NonlinearFit[data,a*x^c+b,x, {{c,2},{b,7},{a,3}}];

NonlinearFit::"badderiv": "The matrix of model derivatives (dimensions
\!\({3, 21}\)) includes DirectedInfinity in at least one element.  Try
fitting without data points having indices in the list \!\({1}\)."

NonlinearFit::"fitfail": "The fitting algorithm failed."
NonlinearFit[data,a*x^2+b, x,{{a,3},{b,7.4}}] \!\(TextForm
\`\(9.63752756272950783`\[InvisibleSpace]\) + 2.99663566285576585`\

  • Prev by Date: Re: Shooting Problem (fwd)
  • Next by Date: No Subject
  • Prev by thread: No Subject
  • Next by thread: No Subject