Plot the volume for a horizontal cylinder
이전 댓글 표시

댓글 수: 3
Star Strider
2019년 9월 26일
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
2019년 9월 26일
Your code appears to do what the assignment requests.
What do you want help with?
Luis Mendez
2021년 6월 5일
how do you pdf your input and output with the Graph
답변 (1개)
Bruno Teramoto
2019년 9월 26일
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
James Tursa
2019년 9월 26일
Please don't post complete answers to homework questions.
카테고리
도움말 센터 및 File Exchange에서 Image Processing Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!