Question

Create a code that performs the following actions: l. Define the flow rate and height of tank 2./ Have the user input a value


ME208 Pessia Problem 2 (5 Points): Using the same function you created for problem I, create a program that tests multiple ra
Create a code that performs the following actions: l. Define the flow rate and height of tank 2./ Have the user input a value for radius 3./ Ask the user for a value of many minutes the tank should fill for 4. Clear the command window (clc) after all of the input commands are given 5. Call in a "tank solver" function that performs the following Takes F, h, r, and t final as inputs, and there are no variable outputs Creates an array for t using t final with 1 minute increments Calculate Vtank, Vliquid final, Percent Full and Vliquid (equations at end of assignment) If the last value of Vliquid is greater than Vtank . " Determine the indices of Vliquid that are greater than Vtank a Use this index to set those values in Vliquid Vtank (levels off plot) - Use the first index from the indices of Vliquid >Vtank and to obtain the time right when the tank is full ( full) Display the tank was full after t full minutes" to the user . Else, display the tank was not completely filled to the user. .Plot Vliquid vs. time array Set x and y labels Use aris() to set the x axis from 0 to t final and vads from O to V Set the title as "Tank of radius r with Vtank using num2str) - +200 . 교가 Tythe of r anTVtank Equations: Vliquid F tarray Percent-filled (liquid-final / Vtank) * 100 Vliquid final-Ffinal
ME208 Pessia Problem 2 (5 Points): Using the same function you created for problem I, create a program that tests multiple radiiat compares them using a subplot. 1. Define the flow rate and height of the tank. 2. Make an array of radii from 5 to 20 m with 5 m increments 3. Set up a for loop that will use the function from problem 1 to plot the liquid for the four tanks Create variable r curr using the loop variable to index from the arny of radi . Call in the "tank solver" function using F, h, r curr, and t fina as Make sure to use the subplot function and use the loop counter in the subplot function set the title as "Tank of radius r with Vtank # Vtank (input value of r and Viank using num2str) 4.
0 0
Add a comment Improve this question Transcribed image text
Answer #1

So ve matab fun ctop : tane stver ino tank colverCFihft-inal Vitiguid Ribd fit dength (3) end etse ene xim cot- Anall end h-

Output:

The tank was full after 51 minutes Figure 1 ม File Edit View rt Iools Desktop Window Help Tank of radius 5 with Vtank-785.39

The tank was not completely filled Figure 1 File Edit View sert Tools Desktop Window Help Tank of radius 5 with Vtank-785.398

Add a comment
Know the answer?
Add Answer to:
Create a code that performs the following actions: l. Define the flow rate and height of tank 2./ Have the user input a value for radius 3./ Ask the user for a value of many minutes the tan...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT