che310mtexam - Ch E 310 Spring 2008 Midterm Exam 1 Name:...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Ch E 310 Spring 2008 Midterm Exam 1 Name: SOLUTIONS Instructions: The exam is open book and open notes You may use your calculator Show all of your work in a neat and concise manner If you need more room to work, use the back of the page or attach scratch paper 1. (25 points) Evaluate the following command line entries (i.e., what will MATLAB return as output?). If MATLAB will give an error, say so and explain why. Wherever possible, please show how you arrived at your answer sufficiently to prove you understand the procedure. a. (2 points) >> 5*ones(3)-[3 4 5; 3 4 5; 2 5 3]' = - = - 2 1 1 3 2 2 3 5 5 5 4 4 2 3 3 5 5 5 5 5 5 5 5 5 3 5 5 5 4 4 2 3 3 1 1 1 1 1 1 1 1 1 5 b. (3 points) >> x=[5 3 5]; y=[3 5 2]'; y*x ( 29 = 10 6 10 25 15 25 15 9 15 5 3 5 2 5 3 (note: y*x x*y ) c. (5 points) >> A=[3 4 5; 8 7 5; 3 7 3]; det(A) det ( 29 ( 29 ( 29 3 7 7 8 5 3 5 3 8 4 7 5 3 7 3 3 7 3 5 7 8 5 4 3 - + - - - = = -42 - 36 + 175 = 97 d. (2 points) >> sqrt(3+3*5-3^3/3+9*3) 6 36 27 3 27 15 3 = = +- + Ch E 310 Spring 2008 Midterm Exam 2 e. (3 points) >> B=[3 9 2; 3 1 3; 5 3 4]; B([1 3],[1:2])^2 = = 54 30 54 54 3 5 9 3 3 5 9 3 3 5 9 3 4 3 5 3 1 3 2 9 3 B f. (4 points) >> sum=0; i=1; while 1/i > .15;... sum=sum + 1/i; a(i)=sum; i=i+1; end; a' = 4500 . 2 2833 . 2 0833 . 2 8333 . 1 5000 . 1 0000 . 1 a g. (3 points) >> (2*ones(2,3))*(4*ones(3,1)) == [24 12]' =...
View Full Document

This test prep was uploaded on 03/26/2008 for the course CHEM E 310 taught by Professor Clapp during the Fall '07 term at Iowa State.

Page1 / 7

che310mtexam - Ch E 310 Spring 2008 Midterm Exam 1 Name:...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online