gibson:teaching:spring-2018:math445:lab11

This shows you the differences between two versions of the page.

Both sides previous revision Previous revision | |||

gibson:teaching:spring-2018:math445:lab11 [2018/05/01 06:20] gibson |
gibson:teaching:spring-2018:math445:lab11 [2018/05/01 06:23] (current) gibson |
||
---|---|---|---|

Line 38: | Line 38: | ||

- | **Problem 2:** Determine the minimum initial ball speed and optimal angle that result in a home run, at sea level, and in Denver. You'll have to start with a guesses for $v_0$ and $\theta$ and tweak them by stages. For a starting point, recall that a good fastball clocks at 90 mph or roughly 40 m/s, and that 45 degrees is $\theta =\pi/4 \approx 0.78$. | + | **Problem 2:** Determine the minimum initial ball speed and optimal angle that result in a home run, at sea level, and in Denver. You'll have to start with a guesses for $v_0$ and $\theta$ and tweak them by stages. For a starting point, recall that a good fastball clocks at 90 mph or roughly 40 m/s, and that the optimal angle is $\theta = \pi/4 \approx 0.79$ when there is no air resistance. |

Note that Matlab's ode45 function will return the x,y positions of the trajectory points at discrete time intervals, and it's unlikely that any of these will line up exactly with the outfield fence. However you can use interpolation to get the ball height y at exactly at the fence, as follows. If you set up your Matlab code so that $x$ is //x(:,1)// and $y$ is //x(:,2)//, the following code will determine the height $y$ of the ball at the position of the fence, $x=120$. | Note that Matlab's ode45 function will return the x,y positions of the trajectory points at discrete time intervals, and it's unlikely that any of these will line up exactly with the outfield fence. However you can use interpolation to get the ball height y at exactly at the fence, as follows. If you set up your Matlab code so that $x$ is //x(:,1)// and $y$ is //x(:,2)//, the following code will determine the height $y$ of the ball at the position of the fence, $x=120$. |

gibson/teaching/spring-2018/math445/lab11.txt ยท Last modified: 2018/05/01 06:23 by gibson