spline_400_2010

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

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

View Full Document Right Arrow Icon
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]
Background image of page 1

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

View Full DocumentRight Arrow Icon
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
Background image of page 2
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
Background image of page 3

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

View Full DocumentRight Arrow Icon
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
Background image of page 4
( 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
Background image of page 5

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

View Full DocumentRight Arrow Icon
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 + - + -
Background image of page 6
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 -
Background image of page 7

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

View Full DocumentRight Arrow Icon
Points from sin(x)
Background image of page 8
Points from sin(x) Linear Interpolation
Background image of page 9

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

View Full DocumentRight Arrow Icon
Points from sin(x) Linear Interpolation & sin(x)
Background image of page 10
Points from ( 29 2 2 1 2 x g x e π - =
Background image of page 11

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

View Full DocumentRight Arrow Icon
Points from g(x) Linear Interpolation
Background image of page 12
Points from g(x) Linear Interpolation & g(x)
Background image of page 13

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

View Full DocumentRight Arrow Icon
Image of page 14
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 Right Arrow Icon
Ask a homework question - tutors are online