Introduction to Matlab: Element by Element Operations

Slides:



Advertisements
Similar presentations
2.3 Modeling Real World Data with Matrices
Advertisements

Section 13-4: Matrix Multiplication
Complex Numbers S. Awad, Ph.D. M. Corless, M.S.E.E. E.C.E. Department University of Michigan-Dearborn Math Review with Matlab: Complex Math.
Solving Algebraic Equations
Matrix Multiplication To Multiply matrix A by matrix B: Multiply corresponding entries and then add the resulting products (1)(-1)+ (2)(3) Multiply each.
Maths for Computer Graphics
1 Matrix Addition, C = A + B Add corresponding elements of each matrix to form elements of result matrix. Given elements of A as a i,j and elements of.
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.
Warm-up 1.Review notes from Friday. 2.What is the dimension of the matrix below?
4.2 Adding and Subtracting Matrices 4.3 Matrix Multiplication
Row 1 Row 2 Row 3 Row m Column 1Column 2Column 3 Column 4.
4.2 Operations with Matrices Scalar multiplication.
Row 1 Row 2 Row 3 Row m Column 1Column 2Column 3 Column 4.
If A and B are both m × n matrices then the sum of A and B, denoted A + B, is a matrix obtained by adding corresponding elements of A and B. add these.
4.3 Matrix Multiplication 1.Multiplying a Matrix by a Scalar 2.Multiplying Matrices.
Matrix Operations.
Matrices Operations The info in this powerpoint came from coolmath.com
MT411 Robotic Engineering Asian Institution of Technology (AIT) Chapter 1 Introduction to Matrix Narong Aphiratsakun, D.Eng.
Objectives: Students will be able to… Multiply two matrices Apply matrix multiplication to real life problems.
4-3 Matrix Multiplication Objectives: To multiply by a scalar To multiply two matrices.
3.6 Multiplying Matrices Homework 3-17odd and odd.
3.5 Perform Basic Matrix Operations Add Matrices Subtract Matrices Solve Matric equations for x and y.
12-2 MATRIX MULTIPLICATION MULTIPLY MATRICES BY USING SCALAR AND MATRIX MULTIPLICATION.
Add and subtract matrices. Multiply by a matrix scalar.
A rectangular array of numeric or algebraic quantities subject to mathematical operations. The regular formation of elements into columns and rows.
Ch. 12 Vocabulary 1.) matrix 2.) element 3.) scalar 4.) scalar multiplication.
MTH108 Business Math I Lecture 20.
Matlab Workshop Getting Started.
13.4 Product of Two Matrices
Sections 2.4 and 2.5 Matrix Operations
MATRICES.
12-1 Organizing Data Using Matrices
Multiplying Matrices.
ECE 1304 Introduction to Electrical and Computer Engineering
Matrix Multiplication
Introduction To Matrices
Matrix Operations SpringSemester 2017.
Section 7.4 Matrix Algebra.
Multiplying Matrices.
WarmUp 2-3 on your calculator or on paper..
Section 3.1 – Operations with Matrices
7.3 Matrices.
Warmup Solve each system of equations. 4x – 2y + 5z = 36 2x + 5y – z = –8 –3x + y + 6z = 13 A. (4, –5, 2) B. (3, –2, 4) C. (3, –1, 9) D. no solution.
Multiplying Matrices.
[ ] [ ] [ ] [ ] EXAMPLE 3 Scalar multiplication Simplify the product:
Introduction to MATLAB [Vectors and Matrices] Lab 2
4.1 Matrices – Basic Operations
MATRICES MATRIX OPERATIONS.
2.2 Introduction to Matrices
ARRAY DIVISION Identity matrix Islamic University of Gaza
Multiplying Matrices.
Dimensions matching Rows times Columns
3.6 Multiply Matrices.
EXPONENTS… RULES?!?! X ? X 5 2 =.
Introduction to Matlab:
Matrix Addition, C = A + B Add corresponding elements of each matrix to form elements of result matrix. Given elements of A as ai,j and elements of B as.
1.8 Matrices.
What is the dimension of the matrix below?
Matrix Operations SpringSemester 2017.
Matrix Multiplication
1.8 Matrices.
Multiplying Matrices.
Arrays and Matrices Prof. Abdul Hameed.
3.5 Perform Basic Matrix Operations Algebra II.
Multiplying Matrices.
Algebra Jeopardy The Basics Matrices
Matrices - Operations INVERSE OF A MATRIX
Introduction to Matrices
Multiplying Matrices.
Presentation transcript:

Introduction to Matlab: Element by Element Operations 5/5/2019 Introduction to Matlab: Matlab Basics Element by Element Operations S. Awad, Ph.D. M. Corless E.C.E. Department University of Michigan-Dearborn

Element by Element Operations (Array Operations) Multiplication Division Power Functions

Element by Element Multiplication Assume a and b are matrices of the same dimensions c = a.*b will give the matrix c with the same dimensions as a & b with c(i,j) = a(i,j)*b(i,j) » a=[1 2 3];b=[4 5 6]; » c=a.*b % [ 1x4 2x5 3x6 ] c = 4 10 18

Element by Element Division Assume a and b are matrices of the same dimensions d = a./b will give the matrix d with the same dimensions as a & b with d(i,j) = a(i,j)/b(i,j) » a=[1 2 3];b=[4 5 6]; » d=a./b % [ 1/4 2/5 3/6 ] d = 0.2500 0.4000 0.5000

Element by Element Power Assume a and b are matrices of the same dimensions e = a.^b will give the matrix d with the same dimensions as a & b with e(i,j) = a(i,j)b(i,j) » a=[1 2 3];b=[4 5 6]; » e=a.^b % [ 1^4 2^5 3^6 ] e = 1 32 729

Element by Element Power The exponent can be a scalar » f = a.^ 2 % [ 1^2 2^2 3^2 ] » f = 1 4 9 The base can be a scalar » m = 2.^ a % [ 2^1 2^2 2^3 ] » m = 2 4 8

Element by Element Functions In Matlab, all functions are element by element array functions. b=sin(a) means b(i,j)=sin(a(i,j))for all i & j There are a large set of functions such as cos, tan, acos, exp, ...