MathGroup Archive 2001

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

Search the Archive

Can Fit give function coefficients?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg31091] Can Fit give function coefficients?
  • From: "Brett Patterson" <bap at roe.ac.uk>
  • Date: Tue, 9 Oct 2001 01:55:42 -0400 (EDT)
  • Organization: Edinburgh University
  • Sender: owner-wri-mathgroup at wolfram.com

I have a set of functions that I wish to fit to some data.
Is there a way to succinctly get Mathematica to give me
the coefficients of these functions in the fit.

For example, say I have
f1[x_] := 2 x^2
f2[x_] := 3 x^3

Normally, if I say: Fit[data, {1, f1[x], f2[x]}, x]
I get a result in the form: a1 + b1 x^2 + c1 x^3,
but I want a result of the form: a2 + b2 f1[x] + c2 f1[x].
In this case, a2 = a1, b2 = b1/2, and c2 = c1/3.

Is this possible?

Regards,
Brett Patterson






  • Prev by Date: AVI-Video with Mathematica V4.2
  • Next by Date: Newbie question
  • Previous by thread: Re: AVI-Video with Mathematica V4.2
  • Next by thread: RE: Can Fit give function coefficients?