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.

Slides:



Advertisements
Similar presentations
259 Lecture 17 Working with Data in MATLAB. Overview  In this lecture, we’ll look at some commands that are useful for working with data!  fzero  sum,
Advertisements

1 Chapter 13 Curve Fitting and Correlation This chapter will be concerned primarily with two separate but closely interrelated processes: (1) the fitting.
1 Eng. Mohamed El-Taher Eng. Ahmed Ibrahim. 2 1.FUNCTION SUMMARY polyfun  Polynomial functions are located in the MATLAB polyfun directory. For a complete.
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.
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.
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.
CITS2401 Computer Analysis & Visualisation
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.
Introduction to Matlab. I use Matlab for: Data analysis Data plotting Image Analysis Also – Simulations (solving odes/pdes/finite element methods) – Minimisations,
Matlab Matlab is a powerful mathematical tool and this tutorial is intended to be an introduction to some of the functions that you might find useful.
Part 4 Chapter 13 Linear Regression
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.
Matlab intro The Environment
Introduction  Today we are looking at how to interpret experimental data  Normally, data is acquired with random errors  How do we take the data and.
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.
MECN 3500 Inter - Bayamon Lecture 7 Numerical Methods for Engineering MECN 3500 Professor: Dr. Omar E. Meza Castillo
Notes Over 6.7 Finding the Number of Solutions or Zeros
MECN 3500 Inter - Bayamon Lecture 9 Numerical Methods for Engineering MECN 3500 Professor: Dr. Omar E. Meza Castillo
MATLAB Basics. The following screen will appear when you start up Matlab. All of the commands that will be discussed should be typed at the >> prompt.
Biostatistics Lecture 17 6/15 & 6/16/2015. Chapter 17 – Correlation & Regression Correlation (Pearson’s correlation coefficient) Linear Regression Multiple.
Curve Fitting and Regression EEE 244. Descriptive Statistics in MATLAB MATLAB has several built-in commands to compute and display descriptive statistics.
Advanced Topics- Polynomials
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.
ECE 4115 Control Systems Lab 1 Spring 2005
The Hong Kong Polytechnic University Industrial Centre 1 MatLAB Lesson 4 : Polynomial Edward Cheung Room W311g 2008.
ES 240: Scientific and Engineering Computation. Chapter 13: Linear Regression 13. 1: Statistical Review Uchechukwu Ofoegbu Temple University.
Introduction To this point MATLAB has been used to answer questions with a numeric value ▫Variables are assigned specific values ▫Answers are numbers MATLAB.
MAE 1202: AEROSPACE PRACTICUM An Introduction to MATLAB: Part 2 Mechanical and Aerospace Engineering Department Florida Institute of Technology Developed.
Lecture 10 2D plotting & curve fitting Subplots Other 2-D Plots Other 2-D Plots Curve fitting © 2007 Daniel Valentine. All rights reserved. Published by.
Scientific Computing Introduction to Matlab Programming.
Scientific Computing General Least Squares. Polynomial Least Squares Polynomial Least Squares: We assume that the class of functions is the class of all.
MECN 3500 Inter - Bayamon Lecture 8 Numerical Methods for Engineering MECN 3500 Professor: Dr. Omar E. Meza Castillo
Polynomials UC Berkeley Fall 2004, E77 Copyright 2005, Andy Packard. This work is licensed under the Creative Commons.
Polynomials, Curve Fitting and Interpolation. In this chapter will study Polynomials – functions of a special form that arise often in science and engineering.
a. b.  To simplify this process, we can use a process called division.  Synthetic division works when dividing a polynomial by.  To get started, make.
PS 5-3 Integration –Discrete data –Polynomial functions Differentiation –Discrete data –Polynomial functions Roots (i.e., zeros) of functions –Polynomial.
5.6 The Fundamental Theorem of Algebra. If P(x) is a polynomial of degree n where n > 1, then P(x) = 0 has exactly n roots, including multiple and complex.
Engineering Analysis ENG 3420 Fall 2009 Dan C. Marinescu Office: HEC 439 B Office hours: Tu-Th 11:00-12:00.
y=a+bx Linear Regression: Method of Least Squares slope y intercept y
1 Lecture 8 Post-Graduate Students Advanced Programming (Introduction to MATLAB) Code: ENG 505 Dr. Basheer M. Nasef Computers & Systems Dept.
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 Training Session 11: Nonlinear Curve Fitting
EEE 244-3: MATRICES AND EQUATION SOLVING
Introduction to Programming for Mechanical Engineers
Working with Data in MATLAB
EEE 244-7: Curve Fitting.
Salinity Calibration fit with MATLAB
Roots and Zeros 5.7.
Notes Over 3.4 The Rational Zero Test
CHAPTER 3 NUMERICAL METHODS.
Lesson 7.2: Finding Complex Solutions of Polynomial Equations
MATLAB Polynomials.
MATLAB Polynomials Nafees Ahmed Asstt. Professor, EE Deptt
Lecture 10 2D plotting & curve fitting
y=a+bx Linear Regression: Method of Least Squares slope y intercept y
Introduction to Matlab
Warm-up: Find the equation of a quadratic function in standard form that has a root of 2 + 3i and passes through the point (2, -27). Answer: f(x) = -3x2.
EEE 244-3: MATRICES AND EQUATION SOLVING
Introduction to Matlab:
Curve Fitting in Matlab
Regression and Correlation of Data
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: Polynomial Manipulations

Numerical Operations: U of M-Dearborn ECE Department Introduction to MATLAB and its Toolboxes Polynomials 2 Polynomial Topics n Entering Polynomials Entering Polynomials n Roots Roots n Multiplication Multiplication n Evaluation Evaluation n Curve Fitting Curve Fitting

Numerical Operations: U of M-Dearborn ECE Department Introduction to MATLAB and its Toolboxes Polynomials 3 Entering Polynomials n In Matlab, a polynomial is represented by a row vector of it’s coefficients in descending order n Is entered as: » p=[ ] n Zero term coefficients MUST be included n For example, the polynomial

Numerical Operations: U of M-Dearborn ECE Department Introduction to MATLAB and its Toolboxes Polynomials 4 Roots To find the roots of a polynomial use roots n Roots are always column vectors » p=[ ]; » r=roots(p) r = i i

Numerical Operations: U of M-Dearborn ECE Department Introduction to MATLAB and its Toolboxes Polynomials 5 Mutliplication Use the conv (convolution) command to evaluate the product of two polynomials: » a=[ ];b=[ ]; » c=conv(a,b) c =

Numerical Operations: U of M-Dearborn ECE Department Introduction to MATLAB and its Toolboxes Polynomials 6 Evaluation polyval is used to evaluate the polynomial p(x) between -1 and 3 » x=linspace(-1,3);% 100 data points » p=[ ];% Coefficients » v=polyval(p,x);% Evaluate » plot(x,v); » title('x^3 +4x^2 -7x -10'); » xlabel('x');

Numerical Operations: U of M-Dearborn ECE Department Introduction to MATLAB and its Toolboxes Polynomials 7 Evaluation Plot

Numerical Operations: U of M-Dearborn ECE Department Introduction to MATLAB and its Toolboxes Polynomials 8 Curve Fitting polyfit implements a least squares curve fitting algorithm » x=[0:0.1:1]; » y=[ ]; » n=2; % Order of Fit » p=polyfit(x,y,n)

Numerical Operations: U of M-Dearborn ECE Department Introduction to MATLAB and its Toolboxes Polynomials 9 Polyfit Polyfit returns coefficients of curve fit solution » p = polyfit(x,y,n) p =

Numerical Operations: U of M-Dearborn ECE Department Introduction to MATLAB and its Toolboxes Polynomials 10 Compare Solutions » xi=linspace(0,1,100); » z=polyval(p,xi); » plot(x,y,'-o',xi,z,':'); » xlabel('x'); » ylabel('y=f(x)'); » title('Second Order Curve Fitting'); n Least Mean Squared (LMS) Error Minimization