The equations of motion can be combined algebraically to yield an equation to de
ID: 3195269 • Letter: T
Question
The equations of motion can be combined algebraically to yield an equation to determine the height of the ball, y , as a function of x and the initial conditions of the ball's release (height, h, initial speed v0 and the angle of release ) : The parameter g = 32.2 ft/s^2 is the acceleration due to gravity. Write a "quarterback calculator" function that outputs the required angle(s) of release given an input vector of one or more throwing velocities (initial speeds) and the location ( x , y) of the target down field. The function should accept the following inputs (in order): A row vector of one or more throwing velocities ( v0 ) in ft/s The height of release ( h ) in ft The distance down field to the receiver ( D ) in ft The height of the target catch ( y ) in feet An initial guess for the numerical solution of in degrees Your function should use fzero along with the input numerical guess to solve for the angle of release ( ) corresponding to each value of the throwing velocity. Your function should have the following output: A row vector of release angles ( ) in degrees corresponding to each value of the input throwing velocity (also in row vector form). Note: The first test case is for a single release velocity, so you can make sure your function works for only scalar inputs before modifying it to solve for a vector of initial speeds. 60.*tan(theta)+57960./v0.^2+6 need to be written up in matlab code with v0 varying from 45:60
Explanation / Answer
Make a vector t with times that the ball will be in the air, with the last number being the longest you might ever expect it to be in the air:
Then get equation for height:
Then plot it
when it hits the ground (h=0) using fzero.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.