You are on page 1of 2

First session problems

1.1 Create the following types of matrices:


a. A = 3 × 4 matrix with all elements set to zero
b. B = 3 × 2 matrix with all elements set to one
c. C = 2 × 3 matrix with all elements randomly generated
d. D = 3 × 3 identity matrix with diagonal elements =1 and off-diagonal = 0

1.2 Given that F= [157 −911 ], find the determinant of F by using MATLAB built-in
determinant function det(.)

1.3 Consider the following 4 × 4 matrix:

a. Find the sum of each row.


b. Find the sum of each column.
c. Find the sum of the diagonal elements.

1.4 Given the H matrix : use the colon ‘:’ operation to


generate the following matrices:

a)

b)

c)
1.5 The following 3 × 3 matrix is given; define it in MATLAB.

Answer the following questions:


a. Minimum of Q?
b. Maximum of Q?
c. Mean of Q?
d. Size of Q?
e. Inverse of Q?
f. Transpose of Q?
g. Q * Q?
h. Q. * Q?

What is the difference between Q * Q and Q. * Q?

You might also like