Gasoline is often stored in underground cylindrical tanks as shown below. Typica
ID: 3874371 • Letter: G
Question
Gasoline is often stored in underground cylindrical tanks as shown below. Typically, a liquid level sensor is used to measure the height (h) of the gasoline level. This information is then used to calculate the volume of the available gasoline. The length (L) and radius (R) of the tank are considered known parameters. Develop a VI to compute and graph the volume of available gasoline as a function of gasoline height (h). Use 100 points to generate the graph of interest. User Inputs: Length of the tank (L, meters) and Radius of the tank (R, meters) Graphical Output: Volume of available gasoline (in gallons) as a function of gasoline level height (h, meters).Explanation / Answer
this is matlab program where x contains length of the cylinder and r is radius.
x = [1 2 3 4 5 6 7 8 9 10];
pi = 3.142;
r = 5;
y = pi * r ^ 2 * x;
semilogy(x,y )
title('Plot title');
xlabel('Height in meters');
ylabel(' volume in gallons');
print -dpdf graph.pdf
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.