QUESTION (1) | 35 Pts]
The dynamic of a projectile fired at an initial velocity (vo in m/s) and angle (a in rad) is described by the following set of equations as a function of time (t) :
Height : h = v₀ ∙ sin(a) ∙ t − ½ ∙ g ∙ t²
Distance : d = v₀ ∙ cos(a) ∙ t
Where, vo=100m/s, a=π/6, g is the acceleration due to gravity (9.8 m/s²) and time range (t) from 0 to 50 containing 100 values.
The purpose of this exercise is to write a Matlab program that does the following:
(a) Define t range and global data (v₀, a, g)
(b) Compute (h) and (d) for all t using the function trajectory having (t) as input and (h,d) as output
(c) Find the max value of h and its index (h_max and h_ind)
(d) Make multiple plots as indicated : Plot (h vs t ) in red color and (d vs t) in dashed blue color, h vs d in triangular markers
(e) Add x-axis and y-axis labels and the title for the graphs !
(f) Reproduce axis limits in h versus d and place the value of h_max at its coordinates