{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Lecture4

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

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

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

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

View Full Document
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

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

View Full Document
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:

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

View Full Document
One could be scalar: a = [ 1 2 3 ] b = 2
Built-in functions also work element-by- element : log and exp trigonometric etc.

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

View Full Document
Array Multiplication (Linear Algebra) In linear algebra, the matrix expression F = A * B means Entries are dot products of rows of the first matrix with columns of the second = * = k c) B(k, * k) A(r, c) F(r,
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### 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
Ask a homework question - tutors are online