Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #9000

Re: Non linear model fitting with an integral model

From DC <b.gatessucks@gmail.com>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: Non linear model fitting with an integral model
Date 2012-03-13 08:10 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <jjmvef$cl8$1@smc.vnet.net> (permalink)
References <jjkeeg$1a6$1@smc.vnet.net>

Show all headers | View raw


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]]

Back to comp.soft-sys.math.mathematica | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

Non linear model fitting with an integral model Juan Baselga <juan.baselga@gmail.com> - 2012-03-12 09:08 +0000
  Re: Non linear model fitting with an integral model DC <b.gatessucks@gmail.com> - 2012-03-13 08:10 +0000

csiph-web