Re: Fit
- To: mathgroup at smc.vnet.net
- Subject: [mg7048] Re: [mg7011] Fit
- From: "Sherman.Reed" <sherman.reed at worldnet.att.net>
- Date: Sat, 3 May 1997 22:04:42 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
I used the following: fitted[x_] = Fit[database,{1,x,x^2},x] Plot[fitted[x],{x,0,1000}] returns the right graph Plot[fitted[z], {z,0,1000}] also returns the right graph. I could not make fitted[x_] := Fit[database,{1,x,x^2},x] work. Sherman C. Reed sherman.reed at worldnet.att.net ---------- > From: WANNKE Michael <wannkem8 at cti.ecp.fr> > To: mathgroup at smc.vnet.net > Subject: [mg7011] Fit > Date: Thursday, May 01, 1997 1:48 PM > > Hi! > > I would like to fit a database. The function Fit works quite well, but > if I use the following command line: > fitted = Fit[database,{1,x,x^2},x] > Mathematica returns a fixed expression with x as variable. The problem > is that now x is the only variable which can be used: > Plot[fitted,{x,0,1000}] returns the right graph > Plot[fitted, {z,0,1000}] returns an error! > > How can I fit my database in order to get a function (style f[x]:=...)? > > > Thank you very much. > > Michael Wannke > wannkem8 at cti.ecp.fr