spline_400_2010

Spline_400_2010 - A Presentation on Interpolation Using Piecewise Linear and Cubic Spline Functions for Math 400 Spring 2010 Bruce Cohen

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.

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 - A Presentation on Interpolation Using Piecewise Linear and Cubic Spline Functions for Math 400 Spring 2010 Bruce Cohen

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

View Full Document
Ask a homework question - tutors are online