Re: Corresponding function to given values...
- To: mathgroup at smc.vnet.net
- Subject: [mg35975] Re: [mg35966] Corresponding function to given values...
- From: BobHanlon at aol.com
- Date: Sun, 11 Aug 2002 05:13:33 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
In a message dated 8/9/02 5:07:06 PM, Sven.Richter at unibw-muenchen.de writes: >Is there a possibility that Mathematica gives me a function to given >pairs of values? >In other words: I have several pairs like {1, 2}, {2, 4}, {3, 9}. And I >what like to know the corresponding function (what is in this example >obviously f[x]=x^2). You have to give it a model to which to fit the data. Needs["Statistics`NonlinearFit`"]; data = {{1,1},{2,4},{3,9}}; model = a*x^2+b*x+c; NonlinearFit[data, model, x, {a,b,c}]//Chop 1.*x^2 Bob Hanlon Chantilly, VA USA