Question: Please help !!! Problem 39 The new coordinates (X_ r, Y_ r) of a point in the x-y plane that is rotated about the 2
Please help !!! Problem 39

The new coordinates (X_ r, Y_ r) of a point in the x-y plane that is rotated about the 2 axis at an angle theta (positive is clockwise) arc given by X_ r = X_0 cos theta - Y_0 sin theta Y_ r = X_0 sin theta + Y_0 cos theta where (X_0, Y_0) are the coordinates of the point before the rotation. Write a user-defined function that calculates (X_ r, Y_ r) given (X_0, Y_0) and theta. For function name and arguments, use [xr, yr] =rotation (x, y, q), where the input arguments are the initial coordinates and the rotation angle in degrees and the output arguments are the new coordinates. (a) Use rotation to determine the new coordinates of a point originally at (6.5,2.1) that is rotated about the z-axis by 25 degree. (b) Consider the function y = (x - 7)^2 + 1.5 for 5 lessthanorequalto x lessthanorequalto 9. Write a program in a script file that makes a plot of the function. Then use rotation to rotate all the points that make up the first plot and make a plot of the rotated function. Make both plots in the same figure and set the range of both axes at 0 to 10. In lottery the player has to guess correctly r numbers that are drawn out of n numbers. The probability, P, of guessing m numbers out of the r numbers can be calculated by the expression
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
