This preview shows pages 1–9. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: EGR 106 Lecture 4 Array Mathematics Linear Algebraic Operations Additon/Subtraction Multiplication Division Element by Element Operations Row/Column Based Operations Textbook 3.13.8 Element by Element Math Operations For arrays of identical sizes, addition is defined term by term : the command F = A + B means F(r,c) = A(r,c) + B(r,c) for all row and column pairs r,c elementbyelement addition For example: Notes: Arrays must be of identical sizes One can be a scalar (it is sized up) Subtraction is identical The other basic math operations work element by element using the dot notation (with A,B the same sizes): multiplication F = A .* B F(r,c) = A(r,c) * B(r,c) division F = A ./ B F(r,c) = A(r,c) / B(r,c) exponentiation: F = A .^ B F(r,c) = A(r,c) ^ B(r,c) note periods! For example: One could be scalar: a = [ 1 2 3 ] b = 2 Builtin functions also work elementby element : log and exp trigonometric etc. Array Multiplication (Linear Algebra) In linear algebra, the matrix expression F = A * B means...
View
Full
Document
This note was uploaded on 10/03/2011 for the course EGR 106 taught by Professor Taggart during the Spring '09 term at Rhode Island.
 Spring '09
 TAGGART

Click to edit the document details