CSC567 - Exercise 0
CSC567 - Exercise 0
Finish reading all sections of Tutorial 1-Vector and Matrices. Then do the exercises below. Many
of the exercises can be answered by a single MATLAB command. If the command is too
complicated, or plotting is required, use more lines.
2. Try the following and ensure you can follow what is happening.
a. A+5
b. A+B
c. A-B
d. A*B
e. A^2
f. A'
4. Let x = [2 5 1 6].
5. Let x = [3 1 5 7 9 2 6]. For each of the following commands first think about what the result
should be and then type the command and verify your answer.
a. x(3)
b. x(1:7)
c. x(1:end)
d. x(1:end-1)
e. x(6:-2:1)
f. x([1 6 2 1 1])
g. sum(x)