{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

spline_400_2010

# spline_400_2010 - A Presentation on Interpolation Using...

This preview shows pages 1–14. Sign up to view the full content.

A Presentation on Interpolation Using Piecewise Linear and Cubic Spline Functions for Math 400 - Spring 2010 Bruce Cohen [email protected] http://www.cgl.ucsf.edu/home/bic David Sklar [email protected]

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Write a formula for a piecewise linear function that interpolates five given data points ( 29 1,1 ( 29 2,2 ( 29 3,2.5 ( 29 4,1.5 ( 29 5,2 0 1 2 3 4 5 6 ( 29 1 2 11 2 1 1 2 2 1 2 1 2 3 3 4 4 5 x if x x if x p x x if x x if x + = - + - Connecting the Dots
Write a formula for a piecewise linear function that interpolates n given data points ( 29 2 1 1 2 2 1 1 2 2 1 2 1 3 2 2 3 3 2 2 3 3 2 3 2 1 1 1 1 1 1 n n n n n n n n n n n n y y y x y x x if x x x x x x x y y y x y x x if x x x x x x x p x y y y x y x x if x x x x x x x - - - - - - - - + - - - - + - - = - - + - - M M ( 29 1 1 , x y ( 29 2 2 , x y ( 29 3 3 , x y ( 29 1 1 , n n x y - - ( 29 , n n x y 1 x 2 x 3 x 1 n x - n x

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Interpolation using a Linear Spline Basis The “linear spline function” approach involves carefully choosing a set of “basis functions” such that the interpolating function can be written as a simple linear combination: 1 2 , , , n Ψ Ψ Ψ K f ( 29 ( 29 ( 29 ( 29 ( 29 1 1 2 2 1 n n n i i i p x y x y x y x y x = = Ψ + Ψ + + Ψ = Ψ L 2 i x - 1 i x - i x 1 i x + 2 i x + ( 29 2 2 , i i x y - - ( 29 1 1 , i i x y - - ( 29 , i i x y ( 29 1 1 , i i x y + + ( 29 2 2 , i i x y + + ( 29 ,1 i x i Ψ 1 , for all n x x x ( 29 1 if 0 if i j ij i j x i j δ = Ψ = = On the data points we have
( 29 ( 29 ( 29 ( 29 ( 29 1 1 2 2 1 n n n i i i p x y x y x y x y x = = Ψ + Ψ + + Ψ = Ψ L 2 i x - 1 i x - i x 1 i x + 2 i x + ( 29 2 2 , i i x y - - ( 29 1 1 , i i x y - - ( 29 , i i x y ( 29 1 1 , i i x y + + ( 29 2 2 , i i x y + + ( 29 ,1 i x i Ψ i i y Ψ 1 1 i i y - - Ψ 1 1 i i i i y y - - Ψ + Ψ A closer look at a linear combination of basis functions

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
The linear spline basis functions can be constructed as sums of translations and horizontal scalings of two “elementary basis functions” ( 29 [ 29 [ 29 1 1 0,1 0 0,1 x if x x if x θ - = ( 29 [ 29 [ 29 2 0,1 0 0,1 x if x x if x θ = ( 29 1 2 1 i i i i x x x x x θ - - - Ψ = - 1 i x - i x 1 i x + 0 1 0 1 1 1 i i i x x x x θ + - + -
A summary description of the linear spline basis ( 29 [ 29 [ 29 2 0,1 0 0,1 x if x x if x θ = ( 29 [ 29 [ 29 1 1 0,1 0 0,1 x if x x if x θ - = 0 1 0 1 1. Elementary basis functions – basically constructed on the unit interval 2. A set of nodes -- 1 2 n x x x < < < L 3. Spline basis functions – sums of (usually) two translated and scaled elementary basis functions 1 i x - i x 1 i x + ( 29 1 2 1 1 1 i i i i i i i x x x x x x x x x θ θ - - + - - Ψ = + - - interior: 2, , 1 i n = - K endpoints: 1 and i n = ( 29 1 1 1 2 1 x x x x x θ - Ψ = - ( 29 1 2 1 n n n n x x x x x θ - - - Ψ = - 1 x 2 x n x 1 n x -

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Points from sin(x)
Points from sin(x) Linear Interpolation

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Points from sin(x) Linear Interpolation & sin(x)
Points from ( 29 2 2 1 2 x g x e π - =

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Points from g(x) Linear Interpolation
Points from g(x) Linear Interpolation & g(x)

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern