{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

AME 150 2nd Midterm Sample

AME 150 2nd Midterm Sample - NAME AME 150 Midterm 2 Closed...

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

View Full Document Right Arrow Icon
NAME: .................................................................. AME 150 - Midterm 2 03/30/06 Closed book, closed notes, no calculator. Problem 1. (30 points). A light ray is reflected in a corner formed by two flat mirrors, one placed along x-axis and the other along y-axis. The incoming ray arrives from above at an angle of 45 degrees with respect to the normal to the vertical mirror and strikes the mirror at x = 0 and y = 1. Write a MATLAB script that makes a plot of the incoming ray and all reflected rays in a domain 0 x 2, 0 y 2. Label all axes and provide a title ’Light reflection in a corner’.
Background image of page 1

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

View Full Document Right Arrow Icon
Problem 2. (40 points) Factorial is defined for any non-negative integer as n ! = 1 , if n=0 , n ! = 1 × 2 × 3 . . . × n, if n = 0 . Denote n ! as nfact in MATLAB syntax and write statements to calculate it for an arbitrary non- negative integer n 1. (20 points) using if-else and while loop constructs 2. (20 points) using if-else and for loop constructs
Background image of page 2
Problem 3. (50 points). A ball thrown into the air at an angle θ degrees with velocity v 0 will hit the ground after time ’traj time’ at a distance ’range’ from the starting point. The following MATLAB script will generate
Background image of page 3

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

View Full Document Right Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}