Re: Questions on fitting and plotting data
- To: mathgroup at smc.vnet.net
- Subject: [mg8115] Re: Questions on fitting and plotting data
- From: dreece at atl.mindspring.com (Daryl Reece)
- Date: Tue, 12 Aug 1997 00:54:55 -0400
- Organization: MindSpring Enterprises, Inc.
- Sender: owner-wri-mathgroup at wolfram.com
Daniel Goscha <dgoscha at phy.ilstu.edu> wrote:
>In[38]:=
>t2 = {{1, 1.5, .5}, {2.3, 2.8, .5}, {3, 3.7, .5}, {4.2, 4.6, .5},
> {5.1, 5, .5}, {6.4, 6.4, .5}, {7.2, 7.7, .5}, {8, 8.9, .5}}
>Out[38]=
>{{1,1.5,0.5},{2.3,2.8,0.5},{3,3.7,0.5},{4.2,4.6,0.5},{5.1,5,0.5},{6.4,6.4,
> 0.5},{7.2,7.7,0.5},{8,8.9,0.5}}
The data needs to be ordered as {{x1,y1,f1},{x2,y2,f2},...}. To
perform a 2-d fit up to 1st order use
Fit[t2, {1,x,y}, {x,y}]
It apperas the fit you generated is good since the function value is
0.5 for all values of x and y.
Everything else appears to be correct.
>In[40]:=
>fit1 = Fit[t2, {1, x }, {x, y}]
>Out[40] =
>0.5-5.55112x10^-17 x
>In[41]:=
>Plot [fit1, {x, 0, 10}]
>In[37]:=
>Show [%, plot1]
>Any help will be greatly appreciated. Many thanks
>-daniel
>--------------------
>daniel l. goscha
>dgoscha at phy.ilstu.edu
><*>