Slideshare uses cookies to improve functionality and performance, and to provide you with relevant advertising. If you continue browsing the site, you agree to the use of cookies on this website. See our User Agreement and Privacy Policy.

Slideshare uses cookies to improve functionality and performance, and to provide you with relevant advertising. If you continue browsing the site, you agree to the use of cookies on this website. See our Privacy Policy and User Agreement for details.

Successfully reported this slideshow.

Like this presentation? Why not share!

1,157 views

Published on

Published in:
Engineering

No Downloads

Total views

1,157

On SlideShare

0

From Embeds

0

Number of Embeds

5

Shares

0

Downloads

161

Comments

0

Likes

9

No embeds

No notes for slide

- 1. Lecture 6 Array operations Eng. Mohamed Awni Electrical & Computer Engineering Dept.
- 2. Agenda 2 Addition & Subtraction. Multiplication & Exponentiation Element by Element operations Relational Operators Exercise Homework Tiny Project
- 3. Addition & subtraction Addition Subtraction
- 4. Addition & subtraction Matrix addition & subtraction properties:
- 5. If A and B are two matrices, the operation A*B can be carried out only if the number of columns in matrix A is equal to the number of rows in matrix B. Multiplication
- 6. Multiplication
- 7. Multiplication
- 8. Multiplication
- 9. ≠ Multiplication
- 10. A matrix product properties: Multiplication
- 11. Element-by- element operations • Carried out on each of the elements of the array • Only carried out on arrays of the same size • Only applied on multiplication, division, and exponentiation
- 12. Element-by- element operations Importance of the element-by element calculations Calculate the corresponding y for each value of x The variable x is represented as a vector with elements -1, -0.5, 0, 0.5, 1 The elements of the vector y corresponding to the elements of the vector x are calculated in one step using element-by element operations
- 13. Element-by- element operations
- 14. Example Use of the element-by-element calculations, where it is required to get the corresponding values of
- 15. 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
- 16. When relational operators are used on arrays, the relational operator is applied element-by-element and produces a logical array with the same dimensions as the original operands Relational Operators
- 17. 1 7 Exercises
- 18. Homework

No public clipboards found for this slide

Be the first to comment