









Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!










LEAST SQUARES CURVE FITTING METHOD
Introduction to LS Fit How it works Designing a Fortran program for it Applications
LEAST SQUARES CURVE FITTING
WHY IS IT NAMED SO? One may consider the actual deviations instead of the squared differences then as being a signed quantity, the positive deviations can cancel the negatives. Now, if one can use the absolute value of the variables then that will have an advantage of avoiding cancellation of errors, but it is not a good function analytically as it is not differentiable and will also not allow to use tools from calculus. So we are left with option of taking the square of the deviations of the points.
HOW IT WORKS
ei =yi-f(xi)
e
Set the values of sum to zero Declare the variables Sx=Sx+x(i) Sy=Sy+y(i) Sx2=Sx2+x(i)x(i) Sy2=Sy2+y(i)y(i) Sxy=Sxy+x(i)*y(i) NEXT i PRINT A AND B END ๐ = ฯ ๐ฆ ฯ ๐ฅ^2 โ ฯ ๐ฅ ฯ ๐ฅ๐ฆ ๐ ฯ ๐ฅ^2 โ ฯ ๐ฅ 2 ๐ = ฯ ๐ฅ ฯ ๐ฆ โ ๐ ฯ ๐ฅ๐ฆ ฯ ๐ฅ 2 โ ๐ ฯ ๐ฅ^2 DO i=1,n FLOWCHART :
EXAMPLE 2 :
Fitting to a curve y= 0.497(x)^0.
APPLICATIONS Here are some of its applications :