Description
Please see attached picture for the task.
Give a Matlab code and graph for the problem.
A ball is thrown vertically upwards with an initial velocity of 30 m/s. Using a time step of 0.02 s up to 6.20 s, write a matlab code to give a plot of the vertical distance versus time for this ball. Hint ; Motion under gravity is described by the equation : π£π¦ = π£ππ¦π‘ + 1 2 ππ‘ 2 and gravitational acceleration π is here taken as negative. Then use your code to answer the following questions: (i) To what maximum height does the ball rise? (ii) What is the index of time at maximum height? (iii) How long does it take the ball to ascend to maximum height? (iv) How long does it take the ball to hit the ground? (v) What happens to the ball if the sign for gravitational acceleration is taken as positive? Give a Matlab code and graph for the problem.
Unformatted Attachment Preview
Purchase answer to see full attachment
Explanation & Answer
The zip file contains the m file for the code and an image of the graph. You can also get the graph by running the code. The code also answers the questions.
To make it easier, here's a document with the graph and answers in it as well. Note that you can get the same graph and...