{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

FinalExamF2008Pt2Solutions

# FinalExamF2008Pt2Solutions - 1 UNIVERSITY AT BUFFALO EAS...

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

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

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 1 UNIVERSITY AT BUFFALO EAS 230 Final Examination Part II December 8, 2008 Each of the 20 questions on Part II is worth 5 points. NAME ______________________________ SECTION#_______ UBIT ID (email):__________ Q1 to Q5 Predict the complete output of the following MatLab code segments. Circle the correct answer. Each segment is independent from the others . Q1) a=[8 2]; b=transpose(a); fprintf ( '%5.0f %5.0f\n' ,b); ---------------------------------------------------------------- Q2) c=[2:4]; d=[4;3;2]; e=c*d; fprintf( '%4.1f \n' ,e); ---------------------------------------------------------------- Q3) a=[5 9 6 2]; b=transpose(a); c=a*b; fprintf('%6.1f\n',c); ---------------------------------------------------------------- Q4) a=[1 2; 3 4]; b=[5; 6]; c=inv(a)*b; fprintf( '%5.2f \n' ,c) %hint, use algebra. ---------------------------------------------------------------- Q5) y=[2:2:6]; z=y.*y; fprintf( '%6.0f \n ' ,z); ---------------------------------------------------------------- 2 8 8 2 2 8 8 2 25.0 50.0 8.0 9.0 8.0 8.0 9.0 8.0 164.0 25.0 81.0 36.0 4.0 25.0 81.0 36.0 4.0 146.0 -4.50 4.00 -9.00 8.00 -4.00 4.50 4.00 -4.50 0 2 4 2 4 8 4 16 36 2 16 36 2 Q6 to Q8) Given the following system of equations: x + y + z = 0 x + y + 3z = 6 x + 2y + 2z = 3 ---------------------------------------------------------------- Q6) Which of the following methods can be used to solve this system of equations? Circle one. a) Newton’s Method b) Substitution c) Secant Method d) Linear Regression ---------------------------------------------------------------- Q7) Which of the following MATLAB m files will solve this system of equations for x, y, and z? Circle one....
View Full Document

{[ snackBarMessage ]}

### Page1 / 5

FinalExamF2008Pt2Solutions - 1 UNIVERSITY AT BUFFALO EAS...

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

View Full Document
Ask a homework question - tutors are online