Problem of a projectile being launched at an angle of O at an initial velocity ofv. The equations for the height hand horizontallocation x as functions of time t are as follows:
h(t) = vtsin () -.5 gt2 2 x(t) = vtcos()
Write a MATLAB program to calculate and store h and x for time increments of 0.1 seconds for e = 20° and v = 200 feet per second. Use a value for g of 32.2 feet/s-. Continue to make the calculations until the projectile hits the ground. Use the plot command to create three graphs:
a. t along the horizontal axis, h along the vertical axis
b. t along the horizontal axis, x along the vertical axis
c. x along the horizontal axis, h along the vertical axis (this is a plot of the trajectory of the projectile)
You can either run the file three times, changing the values to be plotted each time, or you can include three separate plot commands. If you choose the latter option, insert the command figure on a separate line between plot commands. This will open a new plotting window, so the prior graph is not overwritten.