No Subject
- To: mathgroup@smc.vnet.net
- From: Phil Howe <pmhowe@lanl.gov>
- Date: Fri, 30 Jan 1998 04:24:23 -0500
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. Clear[data] 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: Remove[a,b,c,x]; 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`\ x\^2\)