Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 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 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
Step: 1
Get Instant Access with AI-Powered Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started