The trajectory of a ball thrown by a right fielder as defined in the (x, y) coor
ID: 3883815 • Letter: T
Question
The trajectory of a ball thrown by a right fielder as defined in the (x, y) coordinates can be modeled as: y = x(tan(pi/180 theta_0)) - g/2v^2_0 cos^2 (pi/180 theta_0) x^2 + y_0 Where, theta_0, is in degrees, initial velocity v_0 = 40m/s, the distance between right fielder and catcher is 80m. If the throw leaves the right fielder's hand at an elevation of 1.5m and the catcher receives it at 1m. (a) Show an approximate solution for theta_0 graphically on a plot. (How many solutions exist?) (b) Compute an approximation for the appropriate initial angle(s) theta_0 which the right fielder can throw the ball using the bisect function and the fzero function.Explanation / Answer
clear all
clc
v=40;
h=1.8;
x=100;
y=1;
g=9.81;
format long
f = inline('x*tan(t)-g/(2*v^2*cos(t)^2)*x^2+h');
eps_abs = 1e-5;
eps_step = 1e-5;
a = 0.0;
b = 90;
while (b - a >= eps_step || ( abs( f(g,h,a,v,x) ) >= eps_abs && abs( f(g,h,b,v,x) ) >= eps_abs ) )
c = (a + b)/2;
if ( f(g,h,c,v,x) == 0 )
break;
elseif ( f(g,h,a,v,x)*f(g,h,c,v,x) < 0 )
b = c;
else
a = c;
end
end
[a b]
abs( f(g,h,a,v,x) )
abs( f(g,h,b,v,x) )
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.