1. Linear Interpolation and Extrapolation

 

You have a set of data provided below:

 

x

f(x)

 

 

 

0.000

10.6000

 

 

 

1.0000

-5.7392

 

f(3.5) =

-15.2006

2.0000

-4.9876

 

 

 

3.0000

3.5875

 

 

 

4.0000

5.9518

 

f(6.2) =

-14.5306

5.0000

-5.1424

 

 

 

6.0000

-7.5320

 

 

 

 

a)  Find the f(x) for x = 3.5 using the data above.  Find the error.

 

f(3.5) =

4.7697

 

Error =

-19.9703

 

b)  Find the f(x) for x = 6.2 using the data above.  Find the error.

 

f(6.2) =

-8.0099

 

Error =

-6.5207

 

 

 

 

c) Find the f(x) for x = 3.5 using the new data now given.  Find the error.

 

x

f(x)

 

 

 

3.000

3.5875

 

 

 

3.2000

-6.8922

 

f(3.5) =

-15.2006

3.4000

-14.4274

 

 

 

3.6000

-13.6225

 

 

 

3.8000

-4.8575

 

f(6.2) =

-14.5306

4.0000

5.9518

 

 

 

 

f(3.5) =

-14.0250

 

Error =

-1.1756

 

%Program to Solve Problem 1 for Linear Curve Fitting Homework

%version 2007-10-10 D.W. Donovan

clear all;

 

f3p5E = -15.2006;

f6p2E = -14.5306;

 

f3p0 = 3.5875;

f4p0 = 5.9518;

f5p0 = -5.1424;

f6p0 = -7.5320;

f3p4 = -14.4274;

f3p6 = -13.6225;

 

f3p51 = f4p0-((f4p0-f3p0)/(4-3))*(4-3.5)

e3p51 = f3p5E-f3p51

f6p2 = f6p0+((f6p0-f5p0)/(6-5))*(6.2-6)

e6p2 = f6p2E-f6p2

f3p52 = f3p6-((f3p6-f3p4)/(3.6-3.4))*(3.6-3.5)

e3p52 = f3p5E-f3p52

 

%{

f3p51 =   4.7697

e3p51 = -19.9703

f6p2 =  -8.0099

e6p2 =  -6.5207

f3p52 = -14.0250

e3p52 = -1.1756

%}

 

Back To Dr. Donovan's Courses Page

 

Back To Dr. Donovan's Homepage

 

Physics Dept. Homepage

 

NMU Homepage

 

Please send any comments or questions about this page to ddonovan@nmu.edu

This page last updated on October 9, 2015