Professional Documents
Culture Documents
MATLAB Exercises I
MATLAB Exercises I
1 122 2
x
1. 21 36 log(5)
y 2
2.
x
z log( x) log10 ( y ) x y
3. y
x
4. 0
x 9
5.
MATLAB EXERCISES
1 122 2
x
22 36 log(7)
MATLAB EXERCISES
2 3 7 1 i 2
1 2 3
A B C 3 4 i
1 5 6 4 5 6 5 6
16. Use a logic matrix to indicate the locations where the elements of
A and B are the same.
17. Find the elements of B that is less than or equal to 3
MATLAB EXERCISES
18. Write a short MATLAB expression to build the following matrix
1 2 3 4 5 6 7
A9 7 5 3 1 1 3
4 8 16 32 64 128 256
0 0 0
1 2 3 4 5 1 1 1
i) A1 2 3 4 5 ii) A 2 2 2
1 2 3 4 5 3 3 3
4 4 4
MATLAB EXERCISES
20. For given matrix, give MATLAB expression that uses only a
single matrix multiplication with A to obtain
1 2 3 4 5 6 7
A9 7 5 3 1 1 3
4 8 16 32 64 128 256