Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Q 3 ) MATLAB, MAKE CODE COPYABLE Ellipsoid Tank The volume V of a liquid in a partially filled ellipsoid shaped tank is given by:

Q3) MATLAB, MAKE CODE COPYABLE
Ellipsoid Tank
The volume V of a liquid in a partially filled ellipsoid shaped tank is given by:
V(h)=3(3a-h)b2h2a2
Where h is the depth of the fluid measured from the ground. The figure below shows a cross
Develop a single function to create a properly labeled plot of the volume of the liquid versus the depth and/or calculate the total volume of the tank. Use the nargin command to verify the proper number of input arguments and assign units ='m' if no units are provided. Use the nargout command to determine whether to calculate and return the total tank volume. The funrtinn has hoon ctarted in tho HW 1 tomnlate
a) Test #1: Test your function (by calling it from within your script) with the commands: plot_title = 'Volume versus depth for an ellipsoid tank'; ellipsoid_volume(5,4,plot_title,'inch')
b) Test #2: Test your function (by calling it from within your main program) with the command:
V= ellipsoid_volume (6,19)
Use an fprintf statement to display V with four decimal places (e.g. "The volume of the tank is xxxxx.xxxx cubic meters").
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored 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

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

3. What are potential solutions?

Answered: 1 week ago