Please help me to write code for this problem .
The height h(t) and speed S(t) of a projectile (such as a kicked soccer ball, or a rocket) launched with an initial speed S0 at an angle A to the horizontal are given by 2 2 0 2 0 2 0 S(t) S 2S gtsin(A) g t h(t) S tsin(A) 0.5gt = ! + = ! where g is the acceleration due to gravity. The projectile will strike the ground when h(t)=0 which gives the time to hit t 2(S / g)sin(A) hit = 0 . ⢠Write a MATLAB program that computes the hit time for a given initial speed and angle, and displays the hit time and the speed of the rocket when it hits the ground. ⢠Store the program in a script file called rocket.m and run it. Note: you can compute square roots using the MATLAB function sqrt . Do not forget to include comments and a header, use meaningful variable names and indentation when appropriate.