Question: USE MATLAB CODE 1. Write a function to calculate the aerodynamic drag on a body using the equation Co is the drag coefficient A is
1. Write a function to calculate the aerodynamic drag on a body using the equation Co is the drag coefficient A is the frontal area of the body is the density of air V is the velocity The function will have 4 inputs, Co, A, p, and V, and one output, D. In the function, print the resulting drag to the screen using fprint Include the units of the drag, lb. Test the function using the values CD-04, A = 2 ft, = 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
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
