Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
1997
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1997

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

Search the Archive

Re: Fit

  • To: mathgroup at smc.vnet.net
  • Subject: [mg7050] Re: [mg7011] Fit
  • From: seanross at worldnet.att.net
  • Date: Sat, 3 May 1997 22:04:43 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

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