11
Lecture 7 Solving linear equation Eng. Mohamed Awni Electrical & Computer Engineering Dept.

Lecture7

Embed Size (px)

Citation preview

Page 1: Lecture7

Lecture 7

Solving linear equation

Eng. Mohamed Awni

Electrical & Computer Engineering

Dept.

Page 2: Lecture7

Agenda

2

Relational Operators

Determinant & inverse of a matrix

Solving linear equations

Exercise

Page 3: Lecture7

Relational Operators

Relational operators Produce logical values (true OR false) (One or zero)

>> 5>2 ans = 1

>> 5<4 ans = 0

>> 1.5<=1.5 ans = 1

>> 2>=pi

ans = 0

ans = 0 >> 1.8==1.801

Page 4: Lecture7

• When relational operators are used on arrays, the relational operator is applied element-by-element

Relational Operators

• Produces a logical array with the same dimensions as the original operands

Page 5: Lecture7

5

Relational Operators in images

Page 6: Lecture7

Determinant & inverse of a matrix

det(v) • Return the determinant of the square matrix. • Matrix must be square

• Matrix must be square

Inv (v) • Is a matrix such that when multiplied on the right or on the

left by the given matrix, yields the identity matrix; I

Page 7: Lecture7

Determinant & inverse of a matrix

For a square matrix to have an inverse, its determinant must be non- zero value,

Page 8: Lecture7

Solving linear equations

Page 9: Lecture7

Solving system of linear equations using the inv() function

Page 10: Lecture7

Raise the power of A to -1

left division (\) operator

Page 11: Lecture7

Exercises