MATLAB: Operations. In this tutorial, the reader will learn about how to different matrix and polynomial operations.

Similar documents
Name: Chapter 7: Exponents and Polynomials

CITS2401 Computer Analysis & Visualisation

When you square a binomial, you can apply the FOIL method to find the product. You can also apply the following rules as a short cut.

(Mathematical Operations with Arrays) Applied Linear Algebra in Geoscience Using MATLAB

CITS2401 Computer Analysis & Visualisation

5.3. Polynomials and Polynomial Functions

LESSON 9.1 ROOTS AND RADICALS

+ MATRIX VARIABLES AND TWO DIMENSIONAL ARRAYS

Linear Algebra Review. Fei-Fei Li

3. Array and Matrix Operations

Introduction to Matrices

Linear Algebra & Geometry why is linear algebra useful in computer vision?

Polynomial comes from poly- (meaning "many") and -nomial (in this case meaning "term")... so it says "many terms

Linear Algebra Review. Fei-Fei Li

Basic Linear Algebra in MATLAB

MA Lesson 25 Section 2.6

4.3 Division of Polynomials

Review for Mastery. Integer Exponents. Zero Exponents Negative Exponents Negative Exponents in the Denominator. Definition.

LESSON 6.1 EXPONENTS LESSON 6.1 EXPONENTS 253

Computational Methods CMSC/AMSC/MAPL 460. Eigenvalues and Eigenvectors. Ramani Duraiswami, Dept. of Computer Science

A field trips costs $800 for the charter bus plus $10 per student for x students. The cost per student is represented by: 10x x

Lesson 2. When the exponent is a positive integer, exponential notation is a concise way of writing the product of repeated factors.

( ) is called the dependent variable because its

Matrices and Linear Algebra

The word Matrices is the plural of the word Matrix. A matrix is a rectangular arrangement (or array) of numbers called elements.

Multiplication of Polynomials

6.4 Division of Polynomials. (Long Division and Synthetic Division)

Math for ML: review. Milos Hauskrecht 5329 Sennott Square, x people.cs.pitt.edu/~milos/courses/cs1675/

Summer Mathematics Packet Say Hello to Algebra 2. For Students Entering Algebra 2

Section 3.6 Complex Zeros

(i) Represent discrete-time signals using transform. (ii) Understand the relationship between transform and discrete-time Fourier transform

Getting Started with Communications Engineering. Rows first, columns second. Remember that. R then C. 1

Linear Algebra and Matrices

Quantum Computing Lecture 2. Review of Linear Algebra

Pre-Algebra 2. Unit 9. Polynomials Name Period

Section 1.3 Review of Complex Numbers

Review of Linear Algebra

Cayley-Hamilton Theorem

Polynomial and Synthetic Division

22.3. Repeated Eigenvalues and Symmetric Matrices. Introduction. Prerequisites. Learning Outcomes

MATH.2720 Introduction to Programming with MATLAB Vector and Matrix Algebra

3.024 Electrical, Optical, and Magnetic Properties of Materials Spring 2012 Recitation 1. Office Hours: MWF 9am-10am or by appointment

Summer MA Lesson 19 Section 2.6, Section 2.7 (part 1)

Linear Algebra V = T = ( 4 3 ).

Using MATLAB. Linear Algebra

POLYNOMIAL EXPRESSIONS PART 1

Repeated Eigenvalues and Symmetric Matrices

Chapter 2: Numeric, Cell, and Structure Arrays

10.1. Square Roots and Square- Root Functions 2/20/2018. Exponents and Radicals. Radical Expressions and Functions

3.4. ZEROS OF POLYNOMIAL FUNCTIONS

A primer on matrices

Sect Complex Numbers

Lecture 3: Matrix and Matrix Operations

Math for ML: review. ML and knowledge of other fields

1h4 Exponents date: Remember: never leave negative exponents in your final answers. Exponent rules:

Matrix notation. A nm : n m : size of the matrix. m : no of columns, n: no of rows. Row matrix n=1 [b 1, b 2, b 3,. b m ] Column matrix m=1

MOL410/510 Problem Set 1 - Linear Algebra - Due Friday Sept. 30

Chapter Intended Learning Outcomes: (i) Understanding the relationship between transform and the Fourier transform for discrete-time signals

4. Determinants.

A primer on matrices

Alg 1B Chapter 7 Final Exam Review

Numerical Methods Lecture 2 Simultaneous Equations

We use the overhead arrow to denote a column vector, i.e., a number with a direction. For example, in three-space, we write

Upon completion of this course, the student should be able to satisfy the following objectives.

Study Notes on Matrices & Determinants for GATE 2017

Unit 13: Polynomials and Exponents

5.1 Monomials. Algebra 2

LESSON 8.1 RATIONAL EXPRESSIONS I

Chapter 1 Indices & Standard Form

Algebra I Polynomials

Linear Algebra & Geometry why is linear algebra useful in computer vision?

Lesson 3: Polynomials and Exponents, Part 1

Unit 9 Study Sheet Rational Expressions and Types of Equations

Usually, when we first formulate a problem in mathematics, we use the most familiar

UNIT 4: RATIONAL AND RADICAL EXPRESSIONS. 4.1 Product Rule. Objective. Vocabulary. o Scientific Notation. o Base

Day 131 Practice. What Can You Do With Polynomials?

Math for ML: review. CS 1675 Introduction to ML. Administration. Lecture 2. Milos Hauskrecht 5329 Sennott Square, x4-8845

Simplify each numerical expression. Show all work! Only use a calculator to check. 1) x ) 25 ( x 2 3) 3) 4)

Reteach Simplifying Algebraic Expressions

Accuplacer Review Workshop. Elementary Algebra Part II. Week Three. Includes internet links to instructional videos for additional resources:

OR MSc Maths Revision Course

Math Spring 2011 Final Exam

Department of Mechanical Engineering

Appendix: Synthetic Division

MATLAB BASICS. Instructor: Prof. Shahrouk Ahmadi. TA: Kartik Bulusu

Geometry 21 Summer Work Packet Review and Study Guide

Glossary of Linear Algebra Terms. Prepared by Vince Zaccone For Campus Learning Assistance Services at UCSB

Chapter 7 Rational Expressions, Equations, and Functions

Knowledge Discovery and Data Mining 1 (VO) ( )

Section 6.2 Long Division of Polynomials

Linear Algebra and Eigenproblems

Advanced Algebra 2 - Assignment Sheet Chapter 1

3.5. Dividing Polynomials. LEARN ABOUT the Math. Selecting a strategy to divide a polynomial by a binomial

Chapter 6: Rational Expr., Eq., and Functions Lecture notes Math 1010

8.3 Zero, Negative, and Fractional Exponents

Linear Algebra review Powers of a diagonalizable matrix Spectral decomposition

Polynomials. Exponents. End Behavior. Writing. Solving Factoring. Graphing. End Behavior. Polynomial Notes. Synthetic Division.

Warm-Up. Simplify the following terms:

We will work with two important rules for radicals. We will write them for square roots but they work for any root (cube root, fourth root, etc.).

3.3 Dividing Polynomials. Copyright Cengage Learning. All rights reserved.

Transcription:

MATLAB: Operations In this tutorial, the reader will learn about how to different matrix and polynomial operations. Addition and subtraction Create the following matrices in MATLAB: [ ], [ ] To create a C matrix that is the sum of A and B To create a D matrix that is the subtracts of B from A To create G matrix by adding 2 to A matrix. Since you adding a scalar to matrix, MATLAB adds 2 to each element in A, such as Matrix multiplication The inner dimensions of two matrices must agree to perform matrix multiplication and the dimension of the resulting matrix is the two outer dimensions, such as:

Enter the following matrices in MATLAB: A nxm * B mxr =C nxr [ ], y [ ], [ ] Multiple x*y MATLAB will prompt you with dimension error. Now, multiply x with the transpose of y. This will yield a 3x3 matrix because x 3x1 and y 1x3 Note if you multiply transpose of x by y, the operation will yield only one number because x 1x3 and y 3x1 Note a scalar can either multiply a matrix or be multiplied by matrix and the results would be the same, such as: Note you can raise a square matrix to any power, i.e. A^2 because MATLAB would perform A*A operation which does not violate the dimension rules. The same is not true for non-square matrices.

which is the same results as Now try to calculate x^2 (remember x was not a square matrix, it is a column vector) However, you can square each element in x, y or A by using element-wise operator the period (.), MATLAB calculated the square if each element such as Think about the element-wise operator as if you writing a for-loop to perform a certain mathematical operation on each element on a matrix. Array Division This tutorial won t cover matrix division because that will require some introductory remarks about the solution of system of linear equations (A*x=B). In what follows, the discussion will cover array division instead. Consider the expressions x./y, x.\y, A./B and A.\B. First enter the following matrices. [ ], y [ ], [ ], B [ ]

You can think about it as if it is an element by element operation, where the first operation (x.\y) is dividing y by x element-by-element as if you are calculating y./x, such as Matrix inversion Use inv(a) function to calculate the inverse of a square non-singular ( A 0) matrix X. You can check whether or not the determinate is zero by using det() function. Characteristic equation, eigenvalues and eigenvectors Given a matrix A, one can calcuate the characheristic equation using poly(matrix) function, then can calculate the roots of this equation that is the eigenvalues of the matrix using roots(charac_eqn), such as:

The way to interpret the output of the poly(matrix) function is rewrite as a nth order polynomial, where the order of polynomial is number of terms -1(i.e. 4-1 =3 in the example above). So the above characteristic equation can be rewrites as: Next, calculate the roots of the characterstic equation, such To calculate the eigenvalues and eigenvectors of the a matrix, use the eig(matrix) function. Eigenvectors Eigenvalues Polynomial Operations Convolution (product) of polynomial, the product of two polynomials is the convolution of the coefficients. Use conv(a,b) function to calculate the product

Deconvolution (division) of polynomials can be done using deconv(a,b) function, where to calculate the quotient and remainder. The quotient This output mean ( )( ) The remainder Polynomial evaluation, to evaluate a polynomial at given point use polyval(polynomial, value), such Partial fraction expansion, dividing two polynomials can be represented as sum of fractions and direct term. To calculate the partial fraction of a transfer function, use residue(numerator,denominator) function. For example, find the partial fraction expansion of the following transfer function: ( ) ( )

Note that we used printsys(num,den, s ) function to reconstruct the transfer function. Now, let s apply residue() function to calculate the partial fraction expression, such as: Useful functions for ME384students: Syntax [z,p,k]=tf2zp(num,den) [num,den]=zp2tf(z,p,k) [A,B,C.D]=tf2ss(num,den) [num,den]=ss2tf(a,b,c,d) [A,B,C,D]=zp2ss(z,p,k) [z,p,k]=ss2zp(a,b,c,d) sys=tf(num,den) step(sys) sys=series(sys1,sys2) sys=parelle(sys1,sys2) Sys=feedback(sysg,sysh) Description Calculate the zeros, poles and gain from transfer function Calculate the transfer function from zeros, poles and gain Calculate the state-space representation from transfer function Calculate the transfer function from the state-space representation Calculate the state-space representation from zeros, poles and gain Calculate the zeros, poles and gain from state-space representation Create the transfer function from numerator and denominator Generate the step response of dynamic system Series equivalent of two transfer functions Parallel equivalent of two transfer functions Equivalent transfer function of entire feedback system