A- Written QuestionsExam 2

A- Written QuestionsExam 2 - you will automatically fail....

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
14:440:127, Fall 2008 Exam 2 Version A The entire exam is closed book, and there is no collaboration permitted. All of your answers must be written in blue books; you will have separate bluebooks for the “No Computer” and “Computer” sections. Be sure to put your name and RUID on all bluebooks you use. Each “Computer” question is worth twice as much as each “No Computer” questions. All answers must relate to the Matlab programming language. For the first 20 minutes, you will not be permitted to use the computer. After 20 minutes, we will collect your bluebook for the first 4 (written) questions, and you will be permitted no further changes to those answers. For the final 4 questions, you will be permitted to use the computer by logging in to your special “Exam Accounts.” If you log in to your normal engineering account at any point during the exam,
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: you will automatically fail. No Computer Question 1: Write a for loop that uses the following formula to calculate /4: (Note that for the first two terms, n=1. For the next two terms, n=2.) At the end, display the answer you found. (It should be around 0.7854) No Computer Question 2: Write the binary number 101101 in Base 10. (In other words, convert from Base 2 to Base 10) No Computer Question 3: Write a function called dice that simulates the throw of two dice by returning a vector containing 2 random integers between 1 and 6. (The probabilities of getting a 1,2,3,4,5, or 6 for each dice roll should be equal) No Computer Question 4: Write an anonymous function called fivethirds that returns its input raised to the (5/3) power . i.e. after you write your function, I could type fivethirds(8), and Matlab would say ans = 32....
View Full Document

This note was uploaded on 02/29/2012 for the course 440 127 taught by Professor Blase during the Fall '09 term at Rutgers.

Ask a homework question - tutors are online