sample-final

# sample-final - MAE 8 Final Examination Sp 13 Open notes...

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

MAE 8 Final Examination Sp 13 Open notes, closed book & no wireless communication 1.) (20%) Circle choices or write answers in the following multiple choice questions. (Points are deducted for wrong answers.) a.) (2%) The commands " i=0;while i<=3 j=i*4; i=i+1; end; j " will give the result: i.) 16 ii.) 12 iii.) 3 iv.) 4 b.) (8%) Given x = [3 2 1 0] and y = [5 6 7 8], write down the output of each of the following MATLAB commands: i.) x.*y ii.) y’ iii.) y-x(2)+3 iv.) (x.ˆ2)/y(end-2) c.) (4%) Consider the following script: A= [4 5 3 1]; for j=1:1:4 for i=1:1:3 if A(i)>A(i+1) temp=A(i); A(i)=A(i+1); A(i+1)=temp; end end end A The output is: i.) [4 5 3 1] ii.) [5 4 3 1] iii.) [5 5 5 5] iv.) [1 3 4 5] d.) (2%) If a system of linear equations can be written in MATLAB as A*x=b, where A is an m × n matrix x is an n × 1 column vector and b is an m × 1 column vector, which of the following commands will produce optimal solutions for x in MATLAB? i.) x = b ii.) x = b*inv(A) iii.) x = A \ b iv.) x = b/A Name: PID:

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

View Full Document
e.) (2%) The commands "cell_row = {55, 2:4, ‘zak’}; cell_row{3}", gives i.) 55 ii.) ‘zak’ iii.) zak iv.) Both b and c are correct.
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern