Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Part 4 Chapter 17 and 18 Interpolation.

Slides:



Advertisements
Similar presentations
Splines and Piecewise Interpolation
Advertisements

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 ~ Curve Fitting ~ Least Squares Regression Chapter.
Chapter 15 Above: GPS time series from southern California after removing several curve fits to the data.
Part 5 Chapter 19 Numerical Differentiation PowerPoints organized by Dr. Michael R. Gustafson II, Duke University All images copyright © The McGraw-Hill.
High Accuracy Differentiation Formulas
Engineering Analysis ENG 3420 Fall 2009 Dan C. Marinescu Office: HEC 439 B Office hours: Tu-Th 11:00-12:00.
Chapter 18 Interpolation The Islamic University of Gaza
1 Curve-Fitting Spline Interpolation. 2 Curve Fitting Regression Linear Regression Polynomial Regression Multiple Linear Regression Non-linear Regression.
CITS2401 Computer Analysis & Visualisation
ES 240: Scientific and Engineering Computation. InterpolationPolynomial  Definition –a function f(x) that can be written as a finite series of power functions.
Curve-Fitting Interpolation
1cs426-winter-2008 Notes  Ian Mitchell is running a MATLAB tutorial, Tuesday January 15, 5pm-7pm, DMP 110 We won’t be directly using MATLAB in this course,
Polynomial Interpolation
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 181 Interpolation Chapter 18 Estimation of intermediate.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 4 Image Slides.
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. by Lale Yurttas, Texas A&M University Chapter 171 CURVE.
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. by Lale Yurttas, Texas A&M University Chapter 181 Interpolation.
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Interpolation Chapter 18.
Copyright © The McGraw-Hill Companies, Inc
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Numerical Differentiation and Integration Standing.
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. by Lale Yurttas, Texas A&M University Chapter 171 Least.
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Numerical Differentiation and Integration Standing.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 2 Image Slides.
Numerical Integration Formulas
Chapter 8 Traffic-Analysis Techniques. Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 8-1.
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Numerical Differentiation and Integration Part 6 Calculus.
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 ~ Curve Fitting ~ Least Squares Regression Chapter.
CMPS1371 Introduction to Computing for Engineers NUMERICAL METHODS.
Curve Fitting and Interpolation: Lecture (I)
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Part 4 Curve Fitting.
Recap Summary of Chapter 6 Interpolation Linear Interpolation.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Applied Numerical Methods With MATLAB ® for Engineers.
Part 4 Chapter 17 Polynomial Interpolation PowerPoints organized by Dr. Michael R. Gustafson II, Duke University All images copyright © The McGraw-Hill.
Today’s class Spline Interpolation Quadratic Spline Cubic Spline Fourier Approximation Numerical Methods Lecture 21 Prof. Jinbo Bi CSE, UConn 1.
Polynomial Interpolation You will frequently have occasions to estimate intermediate values between precise data points. The function you use to interpolate.
MATLAB for Engineers 4E, by Holly Moore. © 2014 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. This material is protected by Copyright.
17.16 Synthesis of Thyroid Hormone (TH) Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Slide number: 1.
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. by Lale Yurttas, Texas A&M University Chapter 71.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Chapter 22.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 16 Image Slides.
Computers in Civil Engineering 53:081 Spring 2003 Lecture #15 Spline Interpolation.
Recap Cubic Spline Interpolation Multidimensional Interpolation Curve Fitting Linear Regression Polynomial Regression The Polyval Function The Interactive.
Polynomials, Curve Fitting and Interpolation. In this chapter will study Polynomials – functions of a special form that arise often in science and engineering.
Mohiuddin Ahmad SUNG-BONG JANG Interpolation II (8.4 SPLINE INTERPOLATION) (8.5 MATLAB’s INTERPOLATION Functions)
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Part 4 Chapter 15 General Least Squares and Non- Linear.
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 ~ Curve Fitting ~ Least Squares Regression.
Engineering Analysis ENG 3420 Fall 2009 Dan C. Marinescu Office: HEC 439 B Office hours: Tu-Th 11:00-12:00.
Recap Functions with No input OR No output Determining The Number of Input and Output Arguments Local Variables Global Variables Creating ToolBox of Functions.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter Three Statics of Structures Reactions.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Part 5 Integration and Differentiation.
1 Lecture 8 Post-Graduate Students Advanced Programming (Introduction to MATLAB) Code: ENG 505 Dr. Basheer M. Nasef Computers & Systems Dept.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Part 6 - Chapters 22 and 23.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter Fifteen Approximate Analysis of Indeterminate Structures.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 7.
MATLAB ® for Engineers, Holly Moore Fourth Edition, Global Edition © Pearson Education Limited 2015 All rights reserved. Figure 13.1 Interpolation between.
Chapter 13 Transportation Demand Analysis. Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display
Interpolation - Introduction
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Chapter 21 Numerical Differentiation.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Chapter 20 Numerical Integration of Functions.
Lecture 29: Modeling Data. Data Modeling Interpolate between data points, using either linear or cubic spline models Model a set of data points as a polynomial.
MATLAB for Engineers 3E, by Holly Moore. © 2011 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. This material is protected by Copyright.
Polynomial Interpolation
Curve-Fitting Spline Interpolation
Chapter 15 Curve Fitting : Splines
Numerical Integration Formulas
Spline Interpolation Class XVII.
Chapter 2 Excel Fundamentals
Splines and Piecewise Interpolation
Splines There are cases where polynomial interpolation is bad
SKTN 2393 Numerical Methods for Nuclear Engineers
Presentation transcript:

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Part 4 Chapter 17 and 18 Interpolation

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Part Organization Chapter 14 –Brief Review of Statistics –Linear Regression (How to determine the best fit) Chapter 15 –Polynomial Regression –Multiple Linear Regression Chapter 16 – Skip Chapter 17 – Polynomical Interpolation Chapter 18 – Spline Interpolation 2 Focus on built-in MATLAB techniques

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. What if you have closely spaced accurate data – how do you figure out intermediate points? Two techniques are : –Polynomial Interpolation –Spline Interpolation

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 4 1 st order polynomial

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 5

6 2 nd order polynomial

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 7

8 3 rd order polynomial

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 9

10 4 th order polynomial

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 11

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 12 One downside of polynomial interpolation is that higher order polynomials are ‘ill conditioned’ and may exhibit wild oscillations

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. US Population Model 13 Example from Forsythe, Malcolm and Moler 8 data points

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Extrapolation is especially problematic with higher order polynomials

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Linear Spline Interpolation Assume the function between any two points is a straight line

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. How do you find a point in between? X=2, Y=?

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Interpolated Point Interpolated Points Linear Interpolation – Connect the points with a straight line to find y This is a linear spline

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. MATLAB Code interp1 is the MATLAB function for spline interpolation It defaults to linear spline interpolation First define an array of x and y Now define a new x array, that includes the x values for which you want to find y values new_y=interp1(x,y,x_new)

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

Both measured data points and interpolated data were plotted on the same graph. The original points were modified in the interactive plotting function to make them solid circles. knots Linear splines have discontinuous first derivatives at the knots

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Other Interpolating Polynomials We could model each section of the graph as a higher order polynomial. Instead of a straight line we could assume a parabola (quadratic – ie 2 nd order) fit or a cubic fit (3 rd order). 22

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Cubic Spline A cubic spline creates a smooth curve, using a third degree polynomial 1 st and 2 nd derivatives are equal at the ‘knots’

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 24

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. We can get an improved estimate by using the spline interpolation technique

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

Cubic Spline Interpolation. The data points on the smooth curve were calculated. The data points on the straight line segments were measured. Note that every measured point also falls on the curved line. Continuous 1 st and 2 nd derivatives at the knots

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Other Interpolation Techniques MATLAB includes other interpolation techniques including –Nearest Neighbor –Cubic Use the help function to find out more if you are interested

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Multidimensional Interpolation interp2(x,y,z,x i,y i ) interp3(x,y,z,w,x i,y i,z i ) 29 The same ‘method’ options are available for these functions as for interp1

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. An example taken from the interp2 windowed help 10 years20 years30 years Find the wage for someone with 15 years service in 1975

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 31

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Summary Interpolating Polynomials –Fitting data with a polynomial that goes through all the points Spline Interpolating –Linear --- ‘linear’ –Cubic --- ‘spline’ –Multidimensional Spline interpolating