Problem 42915. How Far Can You Throw Something?
As you probably learned in your high school physics class, throwing an object at a 45 degree angle will give you the maximum range. This assumes you are throwing it at ground level, however. If you are throwing it 10, 20 or 50 meters above the ground, 45 degrees will not give you the maximum range; the maximum range is a function of both height and speed.
Given an initial speed V m/sec and a starting height of h meters, calculate both the angle (in degrees) that will give you the longest range, and what that range is (in meters). Use g=9.81 m/sec^2. You can neglect air resistance, and assume that your starting height will always be positive. The angle is measured from the vertical, so an angle of 0 is straight up, 90 degrees is parallel to the ground, and 180 is straight down. Your angle should be between 0180 degrees. Your values for both speed and angle should be correct to a tolerance of 1e6.
For example, with an initial speed of 100 m/sec thrown at ground level (h=0), the maximum range for your projectile is approximately 1019.367 meters, and the angle is 45 degrees. If you have h=50 m with the same speed, it can travel a maximum of 1068.198 meters, but only if you throw it at 46.339 degrees.
Good luck!
Solution Stats
Problem Comments

2 Comments
You must be a robot, James, to be able to discern the angle you throw something to the nearest thousandth of a degree, and at such high speeds...about 30% the speed of sound. I wish I had your arm.
I prefer the term "cyborg," goc3. By the way, have you seen Sarah Connor anywhere? I've been looking for her...
Solution Comments
Show commentsProblem Recent Solvers40
Suggested Problems

27345 Solvers

middleAsColumn: Return all but first and last element as a column vector
602 Solvers

547 Solvers

Determine the number of odd integers in a vector
717 Solvers

Flip the vector from right to left
8835 Solvers
More from this Author80
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!