Please follow and satisfy ALL instructions. Please only write the program for MATLAB.

A ball is tossed with speed v_0 and launch angle theta with respect to the ground. The height of the ball with respect to time is given as h(t) = v_0 t sin(theta) – gt^2/2, where g is the gravitational constant. The speed of the ball with respect to time is given as v(t) = squareroot v^2_0 – 2v gt sin (theta) + g^2 t^2. Using MATLAB’s vectorizing commands plot the height and speed on the same figure using the commands y y axis left to plot(t, h) and y y axis right to plot(t, v) between the rime range of 0 and 3 seconds. Assume the speed v_0 = 20 m/s and the launch angle is theta = 40 deg. Find the times when the height is no less than 6 meters and the speed is no greater than 16 m/s, using MATLAB’s find command.

## Expert Answer

Matlab Code |

clc clear vars close all g = 9.8; % Declaring gravitational constant % plotting hold on % Calculating the time for height > 6 meters % Calculating time for speed < 16 m/s |

**Command Window Output**

**Output Plot**