Re: NonlinearFit problem
- To: mathgroup at smc.vnet.net
- Subject: [mg52058] Re: NonlinearFit problem
- From: Peter Pein <petsie at arcor.de>
- Date: Tue, 9 Nov 2004 01:36:47 -0500 (EST)
- References: <cmnabi$7sn$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Feng-Yin Chang wrote: > Hi All, > Could anyone give me any suggestion for the specified fitting function > f= r^a Exp[-b r]? > My data point was given below, > data={{0, 1.00002}, {2.31507, 26.4522}, {4.32033, 56.8265}, {6.63539, > 59.6674}, {8.64066, 39.5536}, {10.9557, 21.6862}, {12.961, > 10.1456}, {15.276, 4.39652}} > > The following way, > NonlinearFit[data,f,r,{a,b}], gives the error message, > FindFit::njnum: > The Jacobian is not a matrix of numbers at (a,b)={1.,1.}. > > How should I do this fitting without the problem? > > > Feng-Yin Chang, > Institute of Physics,NCTU,Taiwan > Since the derivative of f with respect to a contains Log[r], you should replace the first point in data by sth. like {10^-6,1.00002}. The solution is quite stable for r0=10^-3 or smaller. I get r^5.509797613785286/E^(0.9447850533338638*r) Good luck, Peter -- Peter Pein Berlin