Plot the volume for a horizontal cylinder
Mostrar comentarios más antiguos

3 comentarios
Star Strider
el 26 de Sept. de 2019
Deia Craig’s Answer moved here —
clc
clear
L = 5;
r = 3;
h = [0:.2:r]';
V = ((r^2*acos((r-h)/r)) - (r-h).*sqrt(2*r*h - h.^2))*L;
plot(h,V)
title('Horizontal Cylinder Liquid Volume')
ylabel('Liquid Volume (in^3)')
xlabel('Liquid Depth (in)')
Star Strider
el 26 de Sept. de 2019
Your code appears to do what the assignment requests.
What do you want help with?
Luis Mendez
el 5 de Jun. de 2021
how do you pdf your input and output with the Graph
Respuestas (1)
Bruno Teramoto
el 26 de Sept. de 2019
L = 5;
r = 3;
h = [0:.2:r]';
V = ((r^2*acos((r-h)/r)) - (r-h).*sqrt(2*r*h - h.^2))*L;
plot(h,V)
title('Horizontal Cylinder Liquid Volume')
ylabel('Liquid Volume (in^3)')
xlabel('Liquid Depth (in)')
1 comentario
James Tursa
el 26 de Sept. de 2019
Please don't post complete answers to homework questions.
Categorías
Más información sobre Surface and Mesh Plots en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!