MathGroup Archive 2005

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

Search the Archive

Re: Nonlinear Fit

  • To: mathgroup at smc.vnet.net
  • Subject: [mg59897] Re: Nonlinear Fit
  • From: "Jens-Peer Kuska" <kuska at informatik.uni-leipzig.de>
  • Date: Thu, 25 Aug 2005 06:33:31 -0400 (EDT)
  • Organization: Uni Leipzig
  • References: <dehilr$buv$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Hi,

and

Test[x1_?NumericQ,a1_?NumericQ]:=x1*NIntegrate[a1*x^3,{x,0,100}]

does what you expect ?
Regards
  Jens

"Kevin Towles" <kbt22 at drexel.edu> schrieb im 
Newsbeitrag news:dehilr$buv$1 at smc.vnet.net...
|I am trying to do a nonlinear  fit of a function 
that contains a
| numerical integration.  My problem is that when 
I call the nonlinear
| fit, it tries to evaluate within the nonlinear 
fit call.  For example:
|
| Test=Function[{x1,a1},
| NIntegrate[a*x^3,{x,0,100}]
| ];
|
| NonlinearFit[data,Test[x,a],x,{a,0,1}]
|
| Here I have a variable x and a parameter a. 
This would return an
| NIntegrate error saying that 'NIntegrate is not 
numerical at x={50.}'
| because there is an unknown, a, in the 
integration.
|
| It tries this a couple times and then shuts off 
the functioning of
| NIntegrate for further calculations, making 
fitting this impossible.
| Is there a way to fit this kind of situation 
without having the test
| function evaluate prior to fitting occuring?
|
| Thanks for any help,
|
| Kevin Towles
|
| 



  • Prev by Date: Re: Simplifying Conjugate[] with 5.2 Mac
  • Next by Date: Re: An Array of Equation Parameters
  • Previous by thread: Nonlinear Fit
  • Next by thread: Re: Nonlinear Fit