AME 150 2nd Midterm Sample

AME 150 2nd Midterm Sample - NAME:

Info iconThis preview shows pages 1–4. 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

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: 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. 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 6 = 0 . Denote n ! as nf act 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 Problem 3.Problem 3....
View Full Document

This note was uploaded on 06/01/2008 for the course AME 150L taught by Professor Domaradzki during the Spring '08 term at USC.

Page1 / 6

AME 150 2nd Midterm Sample - NAME:

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

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