Presentation on theme: "Computers in Civil Engineering 53:081 Spring 2003 Lecture #14 Interpolation."— Presentation transcript:
Computers in Civil Engineering 53:081 Spring 2003 Lecture #14 Interpolation
Interpolation: Overview l Objective: estimate intermediate values between precise data points using simple functions l Solutions –Newton Polynomials –Lagrange Polynomials –Spline Interpolation InterpolationCurve Fitting multiple values Curve need not go through data points single value Curve goes through data points
Newton Interpolation Pseudo Code See the textbook!
Features of Newton Divided-Differences to get Interpolating Polynomial l Data need not be equally spaced l Arrangement of data does not have to be ascending or descending, but it does influence error of interpolation l Best case is when the base points are close to the unknown value l Estimate of relative error: Error estimate for n th-order polynomial is the difference between the ( n +1)th and n th-order prediction.
Relative Error As a Function of Order Example 18.5 in text Determine ln(2 ) using the following table MATLAB function interp1 is very useful for this