Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

HW 2 - Q 4 ) MATLAB, PLEASE MAKE CODE COPYABLE The trajectory of a ball thrown by a right fielder as defined in the

HW2-Q4) MATLAB, PLEASE MAKE CODE COPYABLE
The trajectory of a ball thrown by a right fielder as defined in the (x,y) coordinates can be modeled as:
y=x(tan(1800))-g2v02cos2(1800)x2+y0
where the angle at which the ball leaves the right fielder's hand is 0=6, the initial velocity is
v0=92mph, the distance between the right fielder and the catcher is 50m, and the throw leaves
the right fielder's hand at an elevation of 2.1m. You must use g=9.81ms2 and the following
conversion factors: 1 mile =5280 feet and 1 meter =3.28 feet.
a) Plot the function using the plot command in figure 1. Title the plot "MAE 284, Homework 2,
Problem 4, Part a". Use the axis command to change the axis so that the x axis starts at 0
and goes to 50 meters and the y axis goes from 0 to 5m.
b) If the catcher cannot reach above an elevation of 2.6m, will she catch the ball? Use
conditional statements and an fprintf to display the result (e.g. "The elevation at
x=xxm is x.xxxxm. The catcher CAN/CANNOT catch the ball"
where either can or cannot is displayed.)
c) Compute the maximum height reached by the ball using each of the following methods. Use
the fprintf function to print the result. For example, "The maximum height
using goldmin is X.XXXXXXXX m". Display 8 digits to the right of the decimal
point. You may create functions for golden-section and parabolic interpolation.
i. Golden-section search ({:xl=9,xu=49,s=0.2%)
ii. Parabolic interpolation (x1=0x2=21,x3=49, maxiterations =2)
iii. MATLAB's fminbond with iterations displayed. Use a range of 0 to the distance of the
catcher.
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database And Expert Systems Applications 33rd International Conference Dexa 2022 Vienna Austria August 22 24 2022 Proceedings Part 2 Lncs 13427

Authors: Christine Strauss ,Alfredo Cuzzocrea ,Gabriele Kotsis ,A Min Tjoa ,Ismail Khalil

1st Edition

3031124251, 978-3031124259

More Books

Students also viewed these Databases questions