Question: 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.

 This is a MATLAB problem. How far does the arrow travel?

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

ES My library > ENG 006 home > 23.60: How far does the arrow travel? a zyBooks catalog 2 Help/FAQ Your Function A Save C Reset E MATLAB Documentation 1 function [ noWindResitance, withWindResistance, errorGamma)= HowFar (gamma) * Your code goes here 5 end Code to call your function C Reset 1 gamma=0.001 2 [ nowindResitance, withWindResistance, errorGamma]= HowFar(gamma) > Run Functione Assessment Submit Is the error condition identified? Is the correct value calculated for first output parameter? Is the correct value calculated for the second parameter to within a 0.01 m absolute tolerance? Are loops used? ES My library > ENG 006 home > 23.60: How far does the arrow travel? a zyBooks catalog 2 Help/FAQ Your Function A Save C Reset E MATLAB Documentation 1 function [ noWindResitance, withWindResistance, errorGamma)= HowFar (gamma) * Your code goes here 5 end Code to call your function C Reset 1 gamma=0.001 2 [ nowindResitance, withWindResistance, errorGamma]= HowFar(gamma) > Run Functione Assessment Submit Is the error condition identified? Is the correct value calculated for first output parameter? Is the correct value calculated for the second parameter to within a 0.01 m absolute tolerance? Are loops used

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!