MathGroup Archive 1997

[Date Index] [Thread Index] [Author Index]

Search the Archive

Questions on fitting and plotting data

  • To: mathgroup at smc.vnet.net
  • Subject: [mg7952] Questions on fitting and plotting data
  • From: Daniel Goscha <dgoscha at phy.ilstu.edu>
  • Date: Fri, 25 Jul 1997 02:40:27 -0400
  • Organization: Illinois State University-IS/Network Services
  • Sender: owner-wri-mathgroup at wolfram.com

I am *very* low on the Mma learning curve so this may be obvious, but
here is what I am trying to do.  I have a set of data that I want to
plot, fit, and then plot the fit over it.  The problem I am having is
getting the correct fit and getting it to plot.  Here is what I have so
far...

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}}

In[39]:=
plot1 = ErrorListPlot[t2]

**now, here is where I start getting the problems - this is obviously
NOT the correct least-square fit solution to the data I have
specified.**

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
<*>




  • Prev by Date: Help: Implicit 3D function
  • Next by Date: Game Theory/Nash Equilibrium calculations
  • Previous by thread: Re: Help: Implicit 3D function
  • Next by thread: Re: Questions on fitting and plotting data