Question: 1. Write a function to calculate the aerodynamic drag on a body using the equation D= CDA: CDA where PV Co is the drag

 1. Write a function to calculate the aerodynamic drag on a body 

1. Write a function to calculate the aerodynamic drag on a body using the equation D= CDA: CDA where PV Co is the drag coefficient A is the frontal area of the body p is the density of air V is the velocity The function will have 4 inputs, C, A, p, 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 Cp = 0.4, A = 2 ft, p = 0.0024 slugs/ft, 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 shouldn't try to include the units in your calculations. They're just given here for reference.

Step by Step Solution

3.47 Rating (147 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Here is a MATLAB function that calculates the aerodynamic dr... View full answer

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 Programming Questions!