Re: Coefficients from Fit as a list?
- To: mathgroup at smc.vnet.net
- Subject: [mg63412] Re: [mg63396] Coefficients from Fit as a list?
- From: Marcelle Santos <marcellesantos at yahoo.com>
- Date: Fri, 30 Dec 2005 02:32:29 -0500 (EST)
- Sender: owner-wri-mathgroup at wolfram.com
it may not be the smartest way, but I would try this:
Suppose I have this set of data:
data = {{4.5, 3.9}, {4.7, 5.0}, {5.8, 9.0},
{3.9,4.5}};
First do the fit...
f = Fit[data, {1, x, x\^2, x\^3, x\^4, x\^5}, x];
...and than create a list with all the coeficients but
the first...
a = Table[f[[i, 1]], {i, 2, Length[f]}];
...and than add the first coeficient...
PrependTo[a, f[[1]]]
...to get the result:
{192.253, -62.3631, -4.804, 1.66484, 0.365264,
-0.0606564}
Does it solve your problem?
Marcelle Soares-Santos
--- LectorZ <lectorz at mail.ru> wrote:
> Hi there,
>
> How can I store the coefficients from the Fit
> function as a list?
>
> Thanks,
>
> LZ
>
>
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com