Upload
mohamed-awni
View
513
Download
5
Embed Size (px)
Citation preview
Lecture 7
Solving linear equation
Eng. Mohamed Awni
Electrical & Computer Engineering
Dept.
Agenda
2
Relational Operators
Determinant & inverse of a matrix
Solving linear equations
Exercise
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
• 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
5
Relational Operators in images
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
Determinant & inverse of a matrix
For a square matrix to have an inverse, its determinant must be non- zero value,
Solving linear equations
Solving system of linear equations using the inv() function
Raise the power of A to -1
left division (\) operator
Exercises