MathGroup Archive 2000

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

Search the Archive

Re: Fitting a function to a list (newbie)


The standard package Statistics`NonlinearFit` has a suitable funtion.


Allan   
---------------------
Allan Hayes 
Mathematica Training and Consulting
Leicester UK
www.haystack.demon.co.uk
hay at haystack.demon.co.uk
Voice: +44 (0)116 271 4198
Fax: +44 (0)870 164 0565
       
<mathprof at bigfoot.com> wrote in message news:872jej$civ at smc.vnet.net...
> I'm new to Mathematica 4.0, so I apologize if this question is overly
> trivial (and please let me know if there's a place for trivial
> question).
> 
> I have a list that I'd like to fit to the function:
> 
> A + B*Sin[C*x+D]
> 
> In other words, I'd like to find the (approximate numeric) values of
> A,B,C,D that yield the best fit to my data.
> 
> I tried using Fit[], but it only applies to linear combinations of
> functions, and couldn't optomize the values of C and D.
> 
> For this specific problem, I'm guessing some sort of Fourier transform
> might work, but I'm interested in a more general solution -- for example
> if Sin[] were replaced with a more complicated function.
> 
> Any help appreciated!
> 
> 
> Sent via Deja.com http://www.deja.com/
> Before you buy.
> 



  • Prev by Date: Cellular Automaton in Mathematica and OOP
  • Next by Date: Re: Fitting a function to a list (newbie)
  • Previous by thread: Re: Fitting a function to a list (newbie)
  • Next by thread: Re: Fitting a function to a list (newbie)