MathGroup Archive 1997

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

Search the Archive

Re: Fit


WANNKE Michael wrote:
> 
> 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

Use something like:
f[a_]=Evaluate[Fit[database,{1,x,x^2},x]]/.x->a;


  • Prev by Date: Mathematica 3 notebook ButtonBoxes with no ButtonFrames?
  • Next by Date: Re: 3D scatter plot
  • Previous by thread: Re: Mathematica 3 notebook ButtonBoxes with no ButtonFrames?
  • Next by thread: Re: Fit