Question: HW 2 - Q 1 ) MATLAB, PLEASE MAKE CODE COPYABLE Trajectory of a toy missile The trajectory of a toy missile in ( x
HWQ MATLAB, PLEASE MAKE CODE COPYABLE
Trajectory of a toy missile
The trajectory of a toy missile in coordinates can be modeled as the parabola:
where
and
is the initial elevation,
is the initial angle of the missile in radians,
is the initial velocity,
the horizontal distance the missile flies is
the missile hits a practice target at above the ground.
The missile will be launched on Earth where the acceleration due to gravity is
a Since the only unknown in equation is the initial angle, rearrange equation to be in
the form of a function of and plot it for Be sure to label the axes and
turn on the grid see help on the grid function Remember xlabel theta will
produce a on the axis. Even though is in radians, the axis should be in degrees.
b In text write the answer to the question: "How many solutions exist?"
c Compute an approximation for the appropriate initial angles at which the missile can
is more than one solution, be sure to find them all. Use the fprintf function to print out
a table like the one shown below. Add a row for each zero of the function. The values in
the columns will be the result of the root using each method.
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 coordinates for all of the solutions obtained
using the fzero function. Put both plots in a single new figure not subplot Be sure to
include a legend with entries for each solution that look like this:
Trajectory for
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
