Different launch angles for a tennis ball

5 views (last 30 days)
Benjamin Trivers
Benjamin Trivers on 30 Apr 2020
Commented: James Tursa on 30 Apr 2020
How far can you throw a tennis ball? Our goal is to find the launch angle θ, measured up from the ground, that will result in the ball traveling as far forward (in the x direction) as possible. Assume that you can throw the ball at 12 meters/second from a height of 2 meters.
When you need to account for drag, you can assume that the ball’s radius is 0.0265 meters, the ball’s mass is 0.058 kg, the drag coefficient is 0.5, and the density of air is 1.21 kg/meter
We were told to use eulerballistic function
function z = eulerballistic(f, z0, deltat)
z = z0;
i = 1;
while z(2,i) > 0
zprime = f(z(5,i), z(:,i));
z(:,i+1) = z(:,i) + deltat*zprime;
i = i + 1;
if i > 100
break;
end end
end
With everything going on, I have forgotten some of how to start a problem like this. Any help would be much appreciated.
  3 Comments
James Tursa
James Tursa on 30 Apr 2020
I'm assuming the density is 1.21 kg/meter^3, not 1.21 kg/meter.
James Tursa
James Tursa on 30 Apr 2020
How is z defined? (i.e., what are each of the elements?). How is f defined?

Sign in to comment.

Answers (0)

Categories

Find more on Programming 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!