spline_400_2010[1]

spline_400_2010[1] - A Presentation on Interpolation Using...

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

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

View Full Document

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

View Full Document

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

View Full Document

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.

Unformatted text preview: A Presentation on Interpolation Using Piecewise Linear and Cubic Spline Functions for Math 400 - Spring 2010 Bruce Cohen bic@cgl.ucsf.edu http://www.cgl.ucsf.edu/home/bic David Sklar dsklar46@yahoo.com 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 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-------- + -- -- + -- = -- + -- ( 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 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 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 = = + + + = 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 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 = = + + + = 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 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,1 x if x x if x - = ( 29 [ 29 [ 29 2 0,1 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 + 1 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,1 x if x x if x = ( 29 [ 29 [ 29 1 1 0,1 0,1 x if x x if x - = 1 1 1. Elementary basis functions basically constructed on the unit interval 2. A set of nodes -- 1 2 n x x x < < < 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...
View Full Document

This note was uploaded on 09/16/2011 for the course MATH 400 taught by Professor Staff during the Spring '11 term at S.F. State.

Page1 / 43

spline_400_2010[1] - A Presentation on Interpolation Using...

This preview shows document pages 1 - 8. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online