Problem No. 1:
In the Command Window of MATLAB®, what would be the answer. (3-Digits, 3 pts each)
1. >> (14/11)/(33*(5*7)) = ______
3. >> 23/8 - (7/6) = ______
2. >> 2^(4 + (6/8)) = ______
4. >> (20 - (22/17)) = ______
Problem 2: Find the MATLAB Errors in the Command Window lines. Circle the mistake
in each. Assume all variables have been defined previously in MATLAB. (3 pts each)
1. >> yy = 2*z + 9X9
3. >> 9*g = x*y*5
2. >> Z12 = linspace (119, 333, -1b)
4. >> C11 = 10/b:12:22
Problem 3: Given the following vectors, what is the result: (3 pts each)
Answers: a. 1x1 matrix b. 1x5 matrix c. Error d. 1x4 matrix e. 5x4 matrix f. 4x3 matrix
1. xx * yy = ______
x = [1 2 3 4 5] y = [5 6 7 8 9]'
2. x * y * z = ______
z = [0 1 2 3 4] xxx = [1]'
3. y * zz = ______
xx = [3 4 5 6 7]' yy = [1 2 3 4]'
4. yy * zzz = ______
zz = [7 8 9 10] zzz = [2 3 4]
Problem 4: Fill in the letter for the correct answer: (3 pts each)
a. -3 -4 -5 -6 b. Error c. 1 34 67 d. 1 4 7 e. -2 -1 0 1 f. 0 -4
1. >> G = 1:3:9 ______
3. >> H = linspace(0, -4, 2) ______
2. >> M = -3:-1:-6 ______
4. >> K = linspace(-2, 1, 4) ______