MathGroup Archive 2012

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

Search the Archive

Re: Non linear model fitting with an integral model


Use ?NumericQ in the definition of your model :

In[2]:= data=Table[{i,i^2+RandomReal[{-0.5,-.5}]},{i,1,5}]
Out[2]= {{1,0.5},{2,3.5},{3,8.5},{4,15.5},{5,24.5}}

In[3]:= model[a_?NumericQ, b_?NumericQ,x_?NumericQ]:=Integrate[a t+b,{t,0,x}]

In[4]:= NonlinearModelFit[data,model[a,b,x],{a,b},x]
Out[4]= FittedModel[model[2.1087,-0.358696,x]]



  • Prev by Date: More "standard" output form
  • Next by Date: How to define a specific definite integral result in Mathematica
  • Previous by thread: Re: Non linear model fitting with an integral model
  • Next by thread: Re: Non linear model fitting with an integral model