Re: NIntegrate v.s. NonlinerFit

• To: mathgroup at smc.vnet.net
• Subject: [mg25840] Re: NIntegrate v.s. NonlinerFit
• From: "Allan Hayes" <hay at haystack.demon.co.uk>
• Date: Wed, 1 Nov 2000 01:25:30 -0500 (EST)
• References: <8tdpgf\$5ns@smc.vnet.net>
• Sender: owner-wri-mathgroup at wolfram.com

```Carmelo,
One  observation: try NumberQ in place of Number.

--
Allan
---------------------
Allan Hayes
Mathematica Training and Consulting
Leicester UK
www.haystack.demon.co.uk
hay at haystack.demon.co.uk
Voice: +44 (0)116 271 4198
Fax: +44 (0)870 164 0565

"Carmelo La Rosa" <clarosa at dipchi.unict.it> wrote in message
news:8tdpgf\$5ns at smc.vnet.net...
> Hi,
> my problem is the following:
> I have difined a function as following, in order to use in a nonlinear
> bestfit containing a numerical integration (work on WinNT 4.0 and
> Mathematica 3.0)
>
> <<Statistics`NonlinearFit`
> pars={a,b,c}(*parameters for the fit*)
> pars0={.......}(*starting parameters of pars*)
> A(X)=Exp[-a/X]
> K(X)=Exp[-b/X]
>
> f[(T_)?Number,(a_)?Number,(b_)?Number,(c_)?Number]:=
>
(b*K(T)/(K(T)+1)^2)*Exp[-costant*Module[{X},NIntegrate[A(X)*K(X)/(K(X)+1)),{
X,Ton,T}]
>
> the output is a error messagge:
>
> NIntegrate::"nlim": "\!\(X\$1\) = \!\(T\) is not a valid limit of
> integration."
> NIntegrate::"nlim": "\!\(X\$1\) = \!\(T\) is not a valid limit of
> integration."
> NIntegrate::"nlim": "\!\(X\$1\) = \!\(T\) is not a valid limit of
> integration."
> General::"stop":
>     "Further output of \!\(NIntegrate :: \"nlim\"\) will be suppressed
> during \
> this calculation."
>
> In[19]:=
>
> fitted=NonlinearFit[data,Cp[T,pars],pars,T,MaxIterations->3000,
>     Errors\[Rule]1.0,InitialGuess\[Rule]pars0,ProgressTrace\[Rule]True]
>
> NonlinearFit::"toomany":
>     "Too many variables have been provided for the size of the data;
> given \!\
> \(2\)-tuples for data, given \!\(4\) variables."
>
> Any assistance will be greatly appreciated.
>
> Carmelo la Rosa
>
>
> --
> ____________________________________
> ------------------------------------
> Carmelo La Rosa
> Department of Chemical Science
> Laboratory of Biophysical Chemistry
> University of Catania
> V.le A. Doria 6, 95125 Catania
> ITALY
> Tel1. ++39-95-7385114
> Tel2. ++39-95-339572
> Fax   ++39-95-580138
> E-Mail clarosa at dipchi.unict.it
> ------------------------------------
> ____________________________________
>
>
>

```

• Prev by Date: Re: combinatoric card game
• Next by Date: Re: Adding a new style environment
• Previous by thread: Re: combinatoric card game