Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Read Chapra Problem 3.1. An incomplete flow chart for this problem is provided below, together with tasks that should be inserted into the flow chart.
Read Chapra Problem 3.1. An incomplete flow chart for this problem is provided below, together with tasks that should be inserted into the flow chart. Inputs: Rradii of different tanks. d. liquid depths corresponding to different tanks Compute N number of tanks (length of vector Ror d) Yes rivo Fori = 1, 2, ..., N-1 Fori = 1, 2, ..., is di > R ? is d; > 3R ? compute V1 = nr2h/3 (volume of the conical part) compute V1 - Vi + R (d-R) (add the volume of the cylindrical part) compute h = min(Red), r=h print "Overtop" to the screen, and set V = -1 to indicate the error. No Return Volume V (vector) Fill the missing parts A, B, ..., F in the above flow chart by tasks 1 to 6. See the solution template for the required format. Function a Reset MATLAB Documentation function ord = Order(). 3 % Enter correct order of flow chart elements = 1; 5 B = 2; 6 C = 3; 17 D = 4; 8 E = 5; 9 F = 6; om ooooD ord = (A,B,C,D,E,F,G]; % NOTE: this is only a solution template. Do NOT submit it directly. You should replace the right-hand-side of the equations by the a 16 end 3.1 Figure P3.1 shows a cylindrical tank with a conical base. If the liquid level is quite low, in the conical part, the volume is simply the conical volume of liquid. If the liquid level is midrange in the cylindrical part, the total volume of liquid includes the filled conical part and the partially filled cylindrical part. FIGURE P3.1 Use decisional structures to write an M-file to compute the tank's volume as a function of given values of R and d. Design the function so that it returns the volume for all cases where the depth is less than 3R. Return an error message ("Overtop") if you overtop the tankthat is, d > 3R. Test it with the following data: - 0.9 1.5 1.25 1.3 3.8 1.3 4.0 Note that the tank's radius is R
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