Question: Using matlab, write the code for the following problem: The height and speed of a projectile (such as a thrown ball) launched with a speed
Using matlab, write the code for the following problem:

The height and speed of a projectile (such as a thrown ball) launched with a speed of v_0 at an angle alpha to the horizontal are given by h(t) = v__0 t sin alpha - 1/2 gt^2 and v(t) = square v^2_0 - 2v0 gt sin alpha + g^2 t^2 where g is the gravitational acceleration. The projectile will strike the ground when h (t) = 0, which gives the time to hit t__hit = 2 (v_0/g) sin alpha. Use the switch structure to write a MATLAB program to compute (i) the maximum height reached by the projectile, (ii) the total horizontal distance traveled, and (iii) the time to hit. The program should accept as input the user's choice of which quantity to compute and the values of v0, alpha g. Test the case where v_0 = 40 (m/s), alpha = 30 degree, and g = 9.81 (m/s^2) and show the corresponding analysis results
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
