0% found this document useful (0 votes)
10 views4 pages

3 - Curve Fitting

The document outlines an experiment on Curve Fitting using the Least Square Criterion, aimed at teaching students to develop problem-solving skills with numerical methods and programming in C/C++ and MATLAB. It includes objectives, prerequisites, and methods for calculating least square errors for linear and parabolic fits, as well as a comparison of results from calculations and programming. Additionally, it contains review questions to assess students' understanding of the concepts presented.

Uploaded by

varshachougule
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views4 pages

3 - Curve Fitting

The document outlines an experiment on Curve Fitting using the Least Square Criterion, aimed at teaching students to develop problem-solving skills with numerical methods and programming in C/C++ and MATLAB. It includes objectives, prerequisites, and methods for calculating least square errors for linear and parabolic fits, as well as a comparison of results from calculations and programming. Additionally, it contains review questions to assess students' understanding of the concepts presented.

Uploaded by

varshachougule
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Modern Education Society’s

College of Engineering, Pune


NAME OF STUDENT: CLASS:
SEMESTER/YEAR: ROLL NO:
DATE OF PERFORMANCE: DATE OF SUBMISSION:
EXAMINED BY: EXPERIMENT NO:

TITLE: Curve Fitting: Least Square Criteria- 1st and 2nd Degree

AIM:
To write a program on Curve Fitting by Least Square Criterion

OBJECTIVES:
Students must be able to:
o Develop problem solution skills using computers and numerical methods
o Understand various methods of Curve fitting
o Able to draw flow chart and computer program in C/C++
o Able to write MATLAB function for curve fitting as well as plot function.

PRE-REQUISITES:

Least-Squares Criterion: Line –


o Set of data points required , , , ,………… , , where 2.
o The best fitting curve f(x) has the least square error, i.e.

Computer Oriented Numerical Methods Page 1 of


Where, a and b are unknown coefficients.
To obtain Least Square Error, the unknown coefficients must yield zero first derivatives,
i.e.

Solving above equations, we have

…………………………………………

………………………………..

Solve these two equations simultaneously to get values of a and b.

The Least-Squares Parabola:

Using same approach as line, final equations are as follows:

………………………………

……………………

…………………

Solve these three equations simultaneously to get values of a, b and c.

Algorithm / Flowchart:

Computer Oriented Numerical Methods Page 2 of


CONCLUSION:

Comparison between results obtained by calculations and programs:

Sr. Result by
Method Error
No. Calculations Program

Difference in result is due to following reasons:

QUESTIONS FOR REVIEW:


1. The following data

x 1 20 30 40
y 1 400 800 1300
is regressed with least squares regression to y = a o + a1 x . The value of a1 most nearly is
A) 27.480
B) 28.956
C) 32.625
D) 40.000

Computer Oriented Numerical Methods Page 3 of


2. The following data

x 1 20 30 40
y 1 400 800 1300
is regressed with least squares regression to y = a1 x . The value of a1 most nearly is
A) 27.480
B) 28.956
C) 32.625
D) 40.000
3. An instructor gives the same y vs x data as given below to four students.

x 1 10 20 30 40
y 1 100 400 600 1200
They each come up with four different answers for the straight line regression model. Only
one is correct. The correct model is
A) y = 60 x − 1200
B) y = 30 x − 200
C) y = −139.43 + 29.684 x
D) y = 1 + 22.782 x

4. A torsion spring of a mousetrap is twisted through an angle of 1800. The torque vs angle
data is given below.
T N-m 0.110 0.189 0.230 0.250
θ rad 0.10 0.50 1.1 1.5
The amount of strain energy stored in the mousetrap spring in Joules is
A) 0.2987 B) 0.4174 C) 0.8420 D) 1562

5. A scientist finds that regressing the y Vs x data given below to straight-line


y = a 0 + a1 x results in the coefficient of determination for the straight-line model, r2 to
be zero.

x 1 3 11 17
y 2 6 22 ?
The missing value for y at x = 17 most nearly is
A) -2.444 B) 2.000 C) 6.889 D) 34.00

Computer Oriented Numerical Methods Page 4 of

You might also like