Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 2

Manuel S.

Enverga University Foundation


Lucena City, Philippines

Granted Autonomous Status


CHED CEB Res. 076-2009

COMPUTER SIMULATION QUIZ 1. Suppose vectors a and b is described as follows:

a = [2 1 5 0]; 4];

b = [3 2 1

Evaluate by hand the vector c in the following statements.

(a) (b) (c) (d) (e) (f) (g) (h) (i)

c c c c c c c c c

= = = = = = = = =

a b; b + a 3; 2 * a + a . b; b ./ a; b . a; a . b; 2.b+a; 2*b/3.*a; b*2.*a;

2. Write a MATLAB command for the following.


a. Create a vector of the even whole numbers between 31

and 75.
b. Let

x = [3 2 6 8]' and y = [4 1 3 5]'

b1. Add the sum of the elements in x to y b2. Raise each element of x to the power specified by the corresponding element in y. b3. Divide each element of y by the corresponding element in x b4. Multiply each element in x by the corresponding element in y, calling the result z.

COLLEGE OF ENGINEERING & TECHNICAL DEPARTMENT Manuel S. Enverga University Foundation University Site, Brgy. Ibabang Dupay, Lucena City, Philippines; Telephone No. (042) 710-3151

Manuel S. Enverga University Foundation


Lucena City, Philippines

Granted Autonomous Status


CHED CEB Res. 076-2009

b5. Add up the elements in z and assign the result to a variable called w.

COLLEGE OF ENGINEERING & TECHNICAL DEPARTMENT Manuel S. Enverga University Foundation University Site, Brgy. Ibabang Dupay, Lucena City, Philippines; Telephone No. (042) 710-3151

You might also like