Question: need code Problem 4 (12 Points)-MATLAB and Flow Chart A ball starts at a height ho above the surface of the Earth with a vertical

need codeneed code Problem 4 (12 Points)-MATLAB and Flow Chart A ball starts

Problem 4 (12 Points)-MATLAB and Flow Chart A ball starts at a height ho above the surface of the Earth with a vertical velocity vo, the position and velocity as a function of the time will be given by the equations r(t) = gt + Vo Where gis the acceleration due to gravity (-9.81 m/s), h is the height above the ground, and v is the vertical component of the velocity. In addition, t is an array that goes from 0 to 2 seconds in increments of 0.01 seconds. With that said, write a code that does the following (flow chart for the code as well): Ask the user the initial height and velocity. Make sure the entries make sense in the real world. If they do not make sense terminate the code using "return" After it has been determined that the initial height and velocity make sense, calculate the position and velocity of the ball for all the values of t. Check if the position at any time is less than zero. o If the position is never less than zero (h20), plot h(t) vs. t and you are done If the position is ever less than zero, Find when the height goes below zero. Once you find the index when h(t)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!