Answered step by step
Verified Expert Solution
Question
1 Approved Answer
write a program in matlab 2. (30 Points) The trajectory of a toy missile in (x,y) coordinates can be modeled as the parabola: y(x) =
write a program in matlab
2. (30 Points) The trajectory of a toy missile in (x,y) coordinates can be modeled as the parabola: y(x) = 0,** + a,x+Q [1] where vicos (6) a. = tan() and . . . . . yo = 5 m is the initial elevation. is the initial angle of the missile in radians, vs = 50 m/s is the initial velocity, the horizontal distance the missile flies is 200m. the missile hits a practice target at 1m above the ground. The missile will be launched on Venus where the acceleration due to gravity is 8.87 m/s2. a. Since the only unknown in equation [1] is the initial angle, e rearrange equation [1] to be in the form of a function of 8, and plot it for for 10 38. key on the keyboard and then typing 0176 on the numeric area of the keyboard will produce a degree symbol). b. Use the Epzint: function to print out the answer to the question: "How many solutions exist?" o. Compute an approximation for the appropriate initial angle(s) at which the missile can take off and still hit the target tm above the ground using your bisect function and the fzero function. If there is more than one solution, be sure to find them all. Use the sprint function to print out a table like the one shown below. Add a row for each zero of the function. Zero Biseet Fzero DI xx.xxxx xx xxxxxx xx.xxxxx xx.xxxxx d. Plot the solutions on the plot of the function of in the figure from part a. Use an asterisk for the bisect solution and a circle for the fzero solution. If there is more than one solution, use a different color for each solution. Be sure to include a legend in the lower left corner. e. Plot the trajectory of the toy missile in (x,y) coordinates for both of the solutions obtained using the fzero function. Put both plots in a single new figure (but not subplot). Be sure to include a legend with entries for each solution that look like this: Trajectory for 8. xx.xxxxStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started