# Sample-Midterm-Questions-2070U - MATH 2070 Sample midterm...

• Test Prep
• 3
• 100% (4) 4 out of 4 people found this document helpful

This preview shows page 1 - 3 out of 3 pages.

MATH 2070: Sample midterm problemsBelow are some sample problems to guide your revision for the midterm test on March 3. In addition to theproblems in the relevant sections of the text book, you can use these questions as preparation for the test.Be aware that these problems are not exhaustive; they are intended to provide an indication of the style ofquestions that may be asked.1. Provide the output you would expect in an interactiveMatlabsession as a result of entering the givenstatements.For numerical values returned, assumeformat short, i.e., round to 5 decimal digits.If the expression fails to evaluate, writeERRORwith a short comment addressing the reasonwhy the statement will not execute.(a)3+6*5+4/3-7(b)a = 2:3:11(c)a = [-2 8 9];b = [4,5,-2];a - 2*b(d)a = [3,-7,-9];b = [-1,-2,5,1];a .* b(e)a = [9,-3,2];b = [-6,-4,5];a ./ b(f)a = [9;1;-7];b = [0;2;1];a .^ b(g)a = [6,-5,-3,-2];b = [-6,-5,-1,2];a >= b(h)a = -3:2;3*a.^2
2. Provide the output you would expect in an interactiveMatlabsession as a result of entering the givenstatements. Assume the variablesA,B,C, andbare given in yourMatlabworkspace as follows:A = [ 3 -5 ; 2 1 ];B = [ 4 1 ; -1 1 ];C = [ -1 -3 5; -2 4 0 ];b = [ 1; -4 ];If the expression fails to evaluate, writeERRORwith a short comment addressing the reasonwhy the statement will not execute.
1