Presentation is loading. Please wait.

Presentation is loading. Please wait.

CS121 Quiz 3 Fall 2012 Quiz Tips. Quiz 1 Tips Question 1 From the many calculation choices, use eval to calculate the dependent variable P(s), but use.

Similar presentations


Presentation on theme: "CS121 Quiz 3 Fall 2012 Quiz Tips. Quiz 1 Tips Question 1 From the many calculation choices, use eval to calculate the dependent variable P(s), but use."— Presentation transcript:

1 CS121 Quiz 3 Fall 2012 Quiz Tips

2 Quiz 1 Tips Question 1 From the many calculation choices, use eval to calculate the dependent variable P(s), but use solve when P is given to compute independent variable s. Note that plotting and reading the value from the graph is an acceptable method (even if not exact) Question 2 – syntax error – Try to run the expression in Maple to see the error message

3 Quiz 1 Tips Question 3 – Life Expectancy estimate using Least Squares method – Year of Birth = independent variable and – Life expectancy = dependent variable – To compute an expectancy (given a year of birth), evaluate the computed LS expression using the year Note – use eval to compute the dependent variable – To compute the year of birth (given a life expectancy), solve the equation obtained from setting the LS expression to the given life expectancy. Note – use solve to compute the independent variable

4 Quiz 1 Tips Question 4 – Time of Death calculation – Given B(t) = R – (R-Ti) * exp(-k*t) See quiz description for definitions of variables – Part A – given R, Ti, B(t) and t → calculate k Note – after calculating k, unassign('t') before calculating t in the next step – Part B – using this k value, calculate time of death t when R, Ti, B(t) and Ti are given Note – B(t) represents the 1 st reading (taken at time t after death) and Ti represents the temperature when death actually occurred (t minutes prior to the 1 st reading) – Parts C and D are both replications of parts A and B combined 1 st, must re-compute k (as in Part A) since the conditions have changed Then, compute time of death as in Part B. – Note – you might want to use a script since there are 3 cases here – Note – be sure to convert hours to minutes for the calculations

5 Quiz 1 Tips Question 5 – Shutter speed from blur angle – As with problem 4, a script is a good approach to solve multiple versions of this problem – A word on unit conversions Since the shutter speed is desired in seconds, units for the bike's diameter and angular velocity may need to be converted to produce the proper result – eg. d=[feet], vel=[miles/hr] → must convert vel to feet/second Also, if the angle is given in radians, it must be converted to degrees since you are dividing by 360 degrees – In the final part C, the input parameters are expected in the same units as given and all necessary conversions should take place within the function definition


Download ppt "CS121 Quiz 3 Fall 2012 Quiz Tips. Quiz 1 Tips Question 1 From the many calculation choices, use eval to calculate the dependent variable P(s), but use."

Similar presentations


Ads by Google