This preview shows pages 1–2. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: Labor Practices. As you test your program, remember to enter the employees name as a character string, including a single quote at the beginning and end of the name. If youd like to verify your calculations, try the following values: 1 hour = $30, 2 hours = $60, 40 hours = $1200, 41 hours = $1245, 42 hours = $1290 -1 hours = Error, 120.5 hours = Violation of Fair Labor Practices Computer Question 3: Summing primes Write Matlab Code that calculates the sum of all of the prime numbers between 15 and 150: 17 + 19 + 23 + 29 + + 137 + 139 + 149 Note that you are not permitted to use a loop to solve this problem; you must use matrix / vector operations and functions. If you want to check your answer, the correct sum is 2235. Computer Question 4: Plotting a surface For both x and y running from 0 to 100 (in increments of 2), display the following 3-D surface using the surf command. Turn the grid on. z = y*sin(x)/5 Your surface should look something like this:...
View Full Document
- Fall '09