This preview shows page 1. Sign up to view the full content.
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.
- Fall '09