NIntegrate v.s. NonlinerFit
- To: mathgroup at smc.vnet.net
- Subject: [mg25811] NIntegrate v.s. NonlinerFit
- From: Carmelo La Rosa <clarosa at dipchi.unict.it>
- Date: Sat, 28 Oct 2000 01:41:04 -0400 (EDT)
- Organization: Dipartimento di Scienze Chimiche
- Sender: owner-wri-mathgroup at wolfram.com
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 ------------------------------------ ____________________________________