Different launch angles for a tennis ball
古いコメントを表示
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 件のコメント
darova
2020 年 4 月 30 日
I think you need 2 component of velocity
James Tursa
2020 年 4 月 30 日
I'm assuming the density is 1.21 kg/meter^3, not 1.21 kg/meter.
James Tursa
2020 年 4 月 30 日
How is z defined? (i.e., what are each of the elements?). How is f defined?
回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で MATLAB についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!