MathGroup Archive 2000

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

Search the Archive

RE: Using output of a Fit

  • To: mathgroup at smc.vnet.net
  • Subject: [mg24913] RE: [mg24895] Using output of a Fit
  • From: "David Park" <djmp at earthlink.net>
  • Date: Sun, 20 Aug 2000 01:35:02 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

Keith,

I doubt that you want to use Fit each time you wish to evaluate for a
specific x. So define a function using Fit and then you can use that
function each time you want to evaluate.

data = Table[{x, 3 + 5x + Random[Real, {-0.2, 0.2}]}, {x, 0, 10, 0.5}];

f[x_] = Fit[data, {1, x}, x]
3.00155 + 4.99817 x

f[8.1]
43.4867

David Park
djmp at earthlink.net
http://home.earthlink.net/~djmp/

> -----Original Message-----
> From: owenzooey at my-deja.com [mailto:owenzooey at my-deja.com]
To: mathgroup at smc.vnet.net
> I've used
>
> Fit[data,{1,x},x]
>
> to determine a best-fit line.
>
> How can I automatically send the output of Fit to be evaluated using
> different values of x?
>
> Thanks,
> Keith N.



  • Prev by Date: Re: Using output of a Fit
  • Next by Date: Re: How to get two values from a file into two lists?
  • Previous by thread: Re: Using output of a Fit
  • Next by thread: Re: Using output of a Fit