Predicting initial angle of projectile

11 views (last 30 days)
I'm trying to solve the problem below "Find the appropriate initial angle θ, if v= 30 m/s, and the distance to the catcher is 90 m. Note that the throw leaves the right fielder’s hand at an elevation of 1.8 m and the catcher receives it at 1 m. y=(tan θ ) x- g*x^2 /(2 v^2 * (cosθ)^2)+y0; "
by plotting y vs theta graph, i have taken the range of theta = [0,pi], but i'm getting some abnormal graphs. Can anyone please help me out?
my code:
x = 90;
v = 30;
g = 9.8;
y0 = 1.8;
theta = linspace(0,pi,50);
y = x * tan(theta) - (g * x .^2)./(2*((cos(theta)).^2)*v .^2)+y0;
plot(theta,y),grid;
  1 Comment
John D'Errico
John D'Errico on 12 Mar 2017
Show what you have done. As it is, you are just asking someone to do your homework, since we don't know what you have done.

Sign in to comment.

Accepted Answer

David Goodmanson
David Goodmanson on 12 Mar 2017
Hello Swera, what you show here is actually not so bad, except that your range of angles is a lot more than you need. If the outfielder is at x = 0 and the catcher is off to the right at positive x, then you don't need angles greater than 90 degrees (a diagram shows why that is). Angles too close to vertical do not get the job done either. So if you restrict theta to less than, say, 75 degrees or so and help yourself out by using more points, say 1000 or so (you don't want to overdo things but points are inexpensive in this case), you should get a usable graph that you can zoom in on.
  2 Comments
Swera Vapoil
Swera Vapoil on 12 Mar 2017
Edited: Swera Vapoil on 12 Mar 2017
thanks David, but should the graph present negative height with the increase of theta? and do i have to do any other calculation for throwing the ball from a height of 1.8m and catching it at 1m?
David Goodmanson
David Goodmanson on 12 Mar 2017
First, by including y0 you have taken care of the 1.8 m.
For each angle, the equation gives you the height of the ball when it gets to the catcher. Negative y, under the catcher, represents where the ball would be on its path had the ground not gotten in the way first. So for a lot of angles, the ball hits the ground before getting to the catcher. If you do a plot of angle vs. y with the kind of angle range mentioned above, you can zoom in and find that there are actually some angles that give positive heights at the catcher, including 1 m.

Sign in to comment.

More Answers (0)

Categories

Find more on Mathematics in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!