Results 1 to 5 of 5

20070606, 14:21 #1
 Join Date
 Feb 2004
 Location
 Castelar
 Posts
 13
 Thanks
 0
 Thanked 0 Times in 0 Posts
XY Graph and curve fitting (2003)
Hi everyone!
I'd like to know which are the method applied by Microsoft Excel in the XYGraph when we want to fit a curve (interpolate): linear, logarithmic, polynomial, exponential, etc. Does anyone know which is the method applied in each case?
Thank you in advance and I know it is hard to put up with my english. Sorry.
Bye!
Federico.

20070606, 14:42 #2
 Join Date
 Mar 2002
 Posts
 84,353
 Thanks
 0
 Thanked 30 Times in 30 Posts
Re: XY Graph and curve fitting (2003)
For linear and polynomial trend lines, Excel uses the standard leastsquares algorithm. For example, a line has equation
y = ax + b
where a is the slope and b is the intercept with the y axis. The vertical distances of the data points to the line are calculated; these distances are squared and summed. The program determines the values of a and b for which the sum is as small as possible. It is possible to solve this explicitly
For a higher degree polynomial it's similar, but with more coefficients, and in general, the solution is found by iterative approximation.
For logarithmic and exponential trend lines, Excel does the following:
 It calculates the exponential or logarithm of the y values.
 It uses the leastsquares method described above to find the equation for the linear trend line through the transformed y values.
 It calculates the logarithm or exponential of the trend line.

20070606, 15:02 #3
 Join Date
 Feb 2004
 Location
 Castelar
 Posts
 13
 Thanks
 0
 Thanked 0 Times in 0 Posts
Re: XY Graph and curve fitting (2003)
Thank you very much.
Federico.

20070606, 15:39 #4
 Join Date
 Jul 2002
 Location
 Pittsburgh, Pennsylvania, USA
 Posts
 11,225
 Thanks
 14
 Thanked 342 Times in 335 Posts
Re: XY Graph and curve fitting (2003)
<hr>For a higher degree polynomial it's similar, but with more coefficients, and in general, the solution is found by iterative approximation<hr>
Are you sure about this? I always thought this was solved directly using matrices...
Approximations should not be needed unless the equation is nonlinear in the coefficients...
Steve

20070606, 15:48 #5
 Join Date
 Mar 2002
 Posts
 84,353
 Thanks
 0
 Thanked 30 Times in 30 Posts
Re: XY Graph and curve fitting (2003)
<img src=/S/blush.gif border=0 alt=blush width=15 height=15> You're correct  I wasn't thinking clearly.