Numerical Operations S. Awad, Ph.D. M. Corless, M.S.E.E. E.C.E. Department University of Michigan-Dearborn Introduction to Matlab: Numerical Interpolation.

Slides:



Advertisements
Similar presentations
Splines and Piecewise Interpolation
Advertisements

Numerical Analysis. TOPIC Interpolation TOPIC Interpolation.
MATLAB – A Computational Methods By Rohit Khokher Department of Computer Science, Sharda University, Greater Noida, India MATLAB – A Computational Methods.
Matlab Graphics S. Awad, Ph.D. M. Corless, M.S.E.E. E.C.E. Department University of Michigan-Dearborn Introduction to Matlab: 2D Graphics.
Differential Equations Math Review with Matlab: Finding Solutions to Differential Equations S. Awad, Ph.D. M. Corless, M.S.E.E. D. Cinpinski E.C.E. Department.
Programming Environment S. Awad, Ph.D. M. Corless, M.S.E.E. E.C.E. Department University of Michigan-Dearborn Introduction to Matlab: Cells and Structures.
Chapter 15 Above: GPS time series from southern California after removing several curve fits to the data.
©1999 BG Mobasseri 15/24/99 INTERPOLATION AND CURVE FITTING Etter: pp June 16, ‘99.
Introduction to Matlab:
Numerical Operations S. Awad, Ph.D. M. Corless, M.S.E.E. E.C.E. Department University of Michigan-Dearborn Introduction to Matlab: Numerical Integration.
Chapter 18 Interpolation The Islamic University of Gaza
6 March 2006 Interpolation and Approximation using Radial Base Functions (RBF) Alex Chirokov Description of rbfcreate and rbfinterp functions.
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.
Weizmann 2010 © 1 Introduction to Matlab & Data Analysis Lecture 13: Using Matlab for Numerical Analysis.
Numerical Operations S. Awad, Ph.D. M. Corless, M.S.E.E. E.C.E. Department University of Michigan-Dearborn Introduction to Matlab: Optimization Toolbox.
MATLAB EXAMPLES Interpolation and Integration 58:111 Numerical Calculations Department of Mechanical and Industrial Engineering.
Programming Environment S. Awad, Ph.D. M. Corless, M.S.E.E. E.C.E. Department University of Michigan-Dearborn Introduction to Matlab: Control Flow.
Math Review with Matlab: Application: Solving Differential Equations
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,
21 Aug 2007 KKKQ 3013 PENGIRAAN BERANGKA Week 7 – Interpolation & Curve Fitting 21 August am – 9.00 am.
Solving Algebraic Equations S. Awad, Ph.D. M. Corless, M.S.E.E. D. Cinpinski E.C.E. Department University of Michigan-Dearborn Math Review with Matlab:
S. Awad, Ph.D. M. Corless, M.S.E.E. E.C.E. Department University of Michigan-Dearborn Matlab Basics Introduction to Matlab: Matrix Operations.
S. Awad, Ph.D. M. Corless, M.S.E.E. E.C.E. Department University of Michigan-Dearborn Laplace Transform Math Review with Matlab: Calculating the Laplace.
Numerical Operations S. Awad, Ph.D. M. Corless, M.S.E.E. E.C.E. Department University of Michigan-Dearborn Introduction to Matlab: Polynomial Manipulations.
CMPS1371 Introduction to Computing for Engineers NUMERICAL METHODS.
Introduction to MATLAB for Engineers, Third Edition Chapter 6 Model Building and Regression PowerPoint to accompany Copyright © The McGraw-Hill Companies,
Hydroinformatics: Session4 Dr Ivan Stoianov Room 328B Dr Andrew Ireson (Room 304) Mr Juan Rodriguez-Sanchez (411A) Mr Baback.
Recap Summary of Chapter 6 Interpolation Linear Interpolation.
MECN 3500 Inter - Bayamon Lecture 9 Numerical Methods for Engineering MECN 3500 Professor: Dr. Omar E. Meza Castillo
MA/CS 3751 Fall 2002 Lecture 24. MA/CS 3752 ginput ginput is a Matlab function which takes one argument input: number of points to select in the image.
Polynomial Interpolation You will frequently have occasions to estimate intermediate values between precise data points. The function you use to interpolate.
Department of Mechanical Engineering, LSU Session IV MATLAB Tutorials Session IV Mathematical Applications using MATLAB Rajeev Madazhy
S. Awad, Ph.D. M. Corless, M.S.E.E. E.C.E. Department University of Michigan-Dearborn Introduction to Matlab: User Input / Output Programming Environment.
COM335 TOPIC 5 DRAWING CURVES. COM335 Two types of curve : Regular curves Which have a simple equation. For example the circle x 2 + y 2 = r 2 The equation.
Deliverable 2.2: Demonstrator on Multiscale Motion Estimation Florian Becker, Jing Yuan, Christoph Schnörr CVGPR group, University of Mannheim.
41 - 4/24/2000AME 150L1 Solving Engineering Problems, Integrating Equations.
Interpolation.
Computers in Civil Engineering 53:081 Spring 2003 Lecture #15 Spline Interpolation.
Introduction to Numerical Analysis I MATH/CMPSC 455 Splines.
1 ECE 1304 Introduction to Electrical and Computer Engineering Section 1.7 Linear Algebra with MATLAB.
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)
MODEL FITTING jiangyushan. Introduction The goal of model fitting is to choose values for the parameters in a function to best describe a set of data.
Basis of Mathematical Modeling LECTURE 3 Numerical Analysis with MATLAB Dr. N.K. Sakhnenko, PhD, Professor Associate.
Introduction to Matlab Module #8 Page 1 Introduction to Matlab Module #8 – Animation Topics 1.getframe 2.pause 3.Plotting a set of files Textbook Reading.
MTH 204 NUMERICAL ANALYSIS Spring Term MTH 204 NUMERICAL ANALYSIS Spring Term DEPARTMENT of INFORMATION TECHNOLOGIES Assoc. Prof. Dr.
Recap Functions with No input OR No output Determining The Number of Input and Output Arguments Local Variables Global Variables Creating ToolBox of Functions.
MTH Spring Term NUMERICAL ANALYSIS Spring Term MTH Spring Term NUMERICAL ANALYSIS Spring Term INTERNATIONAL.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Part 4 Chapter 17 and 18 Interpolation.
1 Spline Interpolation Method Mechanical Engineering Majors Authors: Autar Kaw, Jai Paul
MATLAB ® for Engineers, Holly Moore Fourth Edition, Global Edition © Pearson Education Limited 2015 All rights reserved. Figure 13.1 Interpolation between.
Matlab/Octave/FreeMat: Powerful Tools for Engineering Analysis BJ Furman 02DEC2012.
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.
Introduction to Programming for Mechanical Engineers
EEE 244-7: Curve Fitting.
Chapter 15 Curve Fitting : Splines
working toward a script that will help analyze data
Spline Interpolation Method
MATH My research interests lie primarily in the area of numerical analysis and scientific computing, …
مناهــــج البحث العلمي
MATH 2140 Numerical Methods
Splines and Piecewise Interpolation
MATH My research interests lie primarily in the area of numerical analysis and scientific computing, …
Multiresolution Meshes for 3-D Object Description
Introduction to Matlab:
Introduction to Matlab: Element by Element Operations
Estimates Made Using Sx
Theory of Approximation: Interpolation
Presentation transcript:

Numerical Operations S. Awad, Ph.D. M. Corless, M.S.E.E. E.C.E. Department University of Michigan-Dearborn Introduction to Matlab: Numerical Interpolation

Numerical Operations: U of M-Dearborn ECE Department Introduction to MATLAB and its Toolboxes Interpolation 2 Interpolation Topics n 1D Interpolation 1D Interpolation n Interp1 Command Interp1 Command n Spline Command Spline Command n 2D Interpolation 2D Interpolation n Interp2 Command Interp2 Command

Numerical Operations: U of M-Dearborn ECE Department Introduction to MATLAB and its Toolboxes Interpolation 3 1-D Interpolation n Given xdata and ydata n Want to estimate the values of the function: xi=[xi(1) xi(2) … ]’ % values of x The command interp1 is used for One Dimensional Interpolation

Numerical Operations: U of M-Dearborn ECE Department Introduction to MATLAB and its Toolboxes Interpolation 4 interp1 Command yi=interp1(xdata,ydata,xi,method) Where the method of interpolation can be:  ‘linear’ for linear interpolation  ‘spline’ for Spline Interpolation  ‘cubic’ for Cubic Interpolation

Numerical Operations: U of M-Dearborn ECE Department Introduction to MATLAB and its Toolboxes Interpolation 5 A Coarse Sine Wave » xdata=[0:pi/4:2*pi]'; » ydata=sin(xdata); » plot(xdata,ydata); » title('Course Sine Wave'); » xlabel('xdata'); » ylabel('ydata');

Numerical Operations: U of M-Dearborn ECE Department Introduction to MATLAB and its Toolboxes Interpolation 6 Interpolated Sine Wave » xi=[0:pi/64:2*pi]'; » yi=interp1(xdata, ydata,xi,'spline'); » plot(xi,yi) » title('Interpolated Sine Wave'); » xlabel('xi'); » ylabel('yi');

Numerical Operations: U of M-Dearborn ECE Department Introduction to MATLAB and its Toolboxes Interpolation 7 Good Fit & Error n Check for Good Fit » plot(xi,sin(xi),'r',xi,yi,'x'); n Check For Error » plot(xi,(yi-sin(xi)));

Numerical Operations: U of M-Dearborn ECE Department Introduction to MATLAB and its Toolboxes Interpolation 8 Spline Use spline for a cubic spline interpolation method » yi=spline(xdata,ydata,xi); » plot(xi,yi); » title('Cubic Spline Interpolation'); » xlabel('xi'); » ylabel('yi');

Numerical Operations: U of M-Dearborn ECE Department Introduction to MATLAB and its Toolboxes Interpolation 9 2-D Interpolation n Consider the following sheet of metal with the following temperatures at different points: n We will estimate the temperatures on a finer scale

Numerical Operations: U of M-Dearborn ECE Department Introduction to MATLAB and its Toolboxes Interpolation 10 Plot Original Mesh n Set up Matrices in Matlab » z=[ ]; » xdata =[1:5]; » ydata=[1:3]'; n Plot the Original Mesh » mesh(xdata,ydata,z); » title('Original Metal Temps'); » zlabel('temp');

Numerical Operations: U of M-Dearborn ECE Department Introduction to MATLAB and its Toolboxes Interpolation 11 Original Mesh n Course n Concave

Numerical Operations: U of M-Dearborn ECE Department Introduction to MATLAB and its Toolboxes Interpolation 12 Finer 2-D Interpolation Estimate Temperature Surface to a finer scale using the interp2 command » xi=[1:0.1:5]; » yi=[1:0.2:3]'; » zi=interp2(xdata,ydata,z,xi,yi,'cubic'); % or ‘linear’ or ‘spline’ » mesh(xi,yi,zi); » title('2D Interp Metal Temps'); » zlabel('temp');

Numerical Operations: U of M-Dearborn ECE Department Introduction to MATLAB and its Toolboxes Interpolation 13 2-D Interpolated Mesh n Smooth n Concave