Re: findfit or solve?

*To*: mathgroup at smc.vnet.net*Subject*: [mg55021] Re: [mg55013] findfit or solve?*From*: "Christoph Lhotka" <lhotka at astro.univie.ac.at>*Date*: Thu, 10 Mar 2005 05:24:20 -0500 (EST)*Sender*: owner-wri-mathgroup at wolfram.com

As you can see in the help browser (FindFit) ... FindFit[data,expr,{par1,p1},par2,p2},...},vars] starts the search for a fit with {pa11->p1, par2->p2,...}.. So in your example define the data: data = {{6.968, 117.1}, {7.967, 123.3}, {9.046, 129.4}, {9.982, 134.6}, {10.951, 139.2}, {11.973, 145.2}, {13.021, 151.1}, {13.892, 159.9}, { 14.888, 167.8}, {15.858, 171.9}, {16.857, 175.7}, {17.854, 177.2}, { 18.724, 175.6}}; and the model: model = model(a,b,c,d,e,t) (use your model, I do not see, the inner structure.) ... and then just type ... FindFit[data, model, {{a, 176}, {b, 160}, {c, 0.1}, {d, 14}, {e, 1.2}}, t] and it will work. There is a very comprehensive and detailed documentation under Mathematica V5.0 Advanced Documentation (Help Browser) with best wishes C.L. On Wed, 9 Mar 2005 06:34:39 -0500 (EST) "Tegla Bela" <spiller at hotmail.co.jp> wrote: > Greetings to everybody, > > I have found a model and I would like to use Mathematica for the data under > the model. The model is as follows: > > = h1 - ((2 * (h1 - h$B&H(B)) / ((EXP(s0 * (t -$B&H(B))) + (EXP(s1 * (t > -$B&H(B))))) > > data = {{6.968, 117.1}, {7.967, 123.3}, {9.046, > 129.4}, {9.982, 134.6}, {10.951, > 139.2}, {11.973, 145.2}, {13.021, 151.1}, {13.892, 159.9}, { > 14.888, 167.8}, {15.858, 171.9}, {16.857, 175.7}, {17.854, 177.2}, { > 18.724, 175.6}}; > > I have managed to do it with nonlinear least-square fitting in other > program. But not working for me in Mathematica. (I do not know how to give > initial values to have the five unknown parameters estimated) These are the > initial values that I would like to use: a=176, b=160, c=0.1, d=14, e=1.2 > (t is the age, first value in each pair of the data) > > Does anybody have idea how it can be done? Any help is appreciated. > > Spiller > > _________________________________________________________________ > $BF|K\9qFb:GBg5i(B570$BK|%f!<%6!<$N(BMSN Hotmail > https://registernet.passport.net/reg.srf?id=2&lc=1041 >