Question: HW 2 - Q 1 ) MATLAB, PLEASE MAKE CODE COPYABLE Trajectory of a toy missile The trajectory of a toy missile in ( x

HW2-Q1) MATLAB, PLEASE MAKE CODE COPYABLE
Trajectory of a toy missile
The trajectory of a toy missile in (x,y) coordinates can be modeled as the parabola:
y(x)=a2x2+a1x+a0[1]
where
a2=-g2v02cos2(0)
a1=tan(0)
a0=y0
and
y0=1.7m is the initial elevation,
0 is the initial angle of the missile in radians,
v0=60ms is the initial velocity,
the horizontal distance the missile flies is 310m,
the missile hits a practice target at 3.8m above the ground.
The missile will be launched on Earth where the acceleration due to gravity is
9.81ms2.
a) Since the only unknown in equation [1] is the initial angle, 0, rearrange equation [1] to be in
the form of a function of 0 and plot it for 10075. 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 x axis. Even though 0 is in radians, the x 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 angle(s)0 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 0 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 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 0=.x2
 HW2-Q1) MATLAB, PLEASE MAKE CODE COPYABLE Trajectory of a toy missile

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!