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.