Answered step by step
Verified Expert Solution
Question
1 Approved Answer
This is a MATLAB problem. How far does the arrow travel? The height of an arrow as a function of distance x when launched from
This is a MATLAB problem.
How far does the arrow travel?
The height of an arrow as a function of distance x when launched from a height of 0 above the ground is described by , where is the angle of the arrow with respect to earth at launch, is the initial speed, and g is the gravitational acceleration. The relationship holds if the arrow experiences no resistance in the air. Accounting for resistance caused by the air, , where the real parameter quantifies the velocity dependent resistance. Ex: Trajectories of an arrow traveling with a wind resistance with when , , are
Write a function to calculate how far does the distance that the arrow will travel when wind resistance can be ignored compared to when windresistance is taken into account. Write a function HowFar to calculate distance in meters of noWindResitance and withWindResistance for a given for the special case when , , and . The function should use the internal function roots to calculate noWindResitance. The root with withWindResistance should be calculated from the function values in the range noWindResitance at an increment of 0.001 meter, and then locating the value withWindResistance . In calculating the function , the program will need to deal with the complication that the argument of log must remain real in order to produce physical values. The function should confirm that and if not set a logical error flag to true and the variables noWindResitance and withWindResistance should be empty. Restriction: The function HowFar may not use loops. For example:
[ noWindResitance, withWindResistance,errorGamma]= HowFar(0.0001)
noWindResitance =
1.2500e+03
withWindResistance =
1.2493e+03
errorGamma =
logical
0
and
[ noWindResitance, withWindResistance,errorGamma]= HowFar(0)
noWindResitance =
[]
withWindResistance =
[]
errorGamma =
logical
1
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started