Answered step by step
Verified Expert Solution
Link Copied!

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.

image text in transcribed

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

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 Design Query Formulation And Administration Using Oracle And PostgreSQL

Authors: Michael Mannino

8th Edition

1948426951, 978-1948426954

More Books

Students also viewed these Databases questions

Question

9. Describe the characteristics of power.

Answered: 1 week ago