Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed
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. The formula for time to drain the tank is time = (rt / ro) 2 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

Step: 1

blur-text-image

Get Instant Access with AI-Powered 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

Students also viewed these Databases questions

Question

Explain the steps involved in training programmes.

Answered: 1 week ago

Question

What are the need and importance of training ?

Answered: 1 week ago