Question: MATLAB NOTE: Please make sure to Use plot to create a graph of time as a function of height, and insert a grit along with

ENGR 1204 Programming Languages in Engineering MATLAB Lab 6 Write a MATLAB program (.M script file) to calculate the time to drain a cylindrical water tank for an initial water height ranging from 1 to 10 feet. The tank has a radius (rt) of 2 feet and the drain radius (ro) is 0.3 inch. The gravitational constant is 32.2 feet/sec.2 The formula for time to drain the tank is time = (rt/ro)? h/vavg % where vavg=0.5 (2 g h) (average velocity) In your program, assign the values to rt, ro, and g. Create and display a vector h for the initial water heights of 1, 2, 3, ..., 10 feet. Use the formula above to calculate and display vavg in ft./sec. and time in hours. Use plot to create a graph of time as a function of height, and insert a grid along with appropriate axis labels and title. Run the program and observe the plot and results in the command window
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
