Lecture4 - EGR 106 Lecture 4 Array Mathematics Linear...

Info iconThis preview shows pages 1–9. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the 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.1-3.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 element-by-element 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 Built-in functions also work element-by- 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.

Page1 / 30

Lecture4 - EGR 106 Lecture 4 Array Mathematics Linear...

This preview shows document pages 1 - 9. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online