Question
Write a function to calculate the aerodynamic drag on a body using the equation D = (C_d)*A*.5*p*V^2 where C D is the drag coefficient A
Write a function to calculate the aerodynamic drag on a body using the equation
D = (C_d)*A*.5*p*V^2
where
CD is the drag coefficient
A is the frontal area of the body
r is the density of air
V is the velocity
The function will have 4 inputs, CD, A, r, and V, and one output, D. In the function, print the resulting drag to the screen using fprintf. Include the units of the drag, lb.
Test the function using the values CD = 0.4, A = 2 ft2, r = 0.0024 slugs/ft3, V = 30 ft/s. The answer should be 0.864 lb. Now run the function again using a velocity of 60 ft/s, leaving the other inputs the same. The result should be 3.456 lb.
Note that you shouldnt try to include the units in your calculations. Theyre just given here for reference.
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