Vous êtes sur la page 1sur 2

Section A: Answer all the questions, (the total is 20 marks)

1. How are variables named in Matlab ? (2 pts)


2. Write two ways to display the following matrix (2 pts)

3. Given the matrix A on question 2. (4 pts)


a) Write a command to convert the matrix A into a column vector matrix named B.
b) Write a command to find the sum of the third and fifth entries of B

4. Are the following variable names correct? If no, explain why. (6 pts)
a) Max
b) Sin
c) 12eggs
d) A-menu
e) a_if
f) mag@new

5. What is the output from the following MATLAB Commands? (6 pts)


a) >> a = 3;b = 2; c = a + b
b) >> d = 1:5; 2*d(3:4)
c) >> who

Section B: Answer any two questions of your choice (20 marks)


Each question worth 10 marks

1. Using the problem solving approach, find the total area of a cylinder with 5cm of radius and the
height of 10cm.

2. Using matrices:

1
3. Given the following matrices, answer the questions below.

a) Write a command for matrix Multiplication of CD


b) Write a command to arrange the element of the vector E in ascending order
c) Write a command to return the smallest element of vector E.
d) Delete 2nd column from matrix C.
e) Use Left division to solve X = A-1B

Good Luck

Vous aimerez peut-être aussi