Plot the volume for a horizontal cylinder

댓글 수: 3

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
Star Strider 2019년 9월 26일
Your code appears to do what the assignment requests.
What do you want help with?
Luis Mendez
Luis Mendez 2021년 6월 5일
how do you pdf your input and output with the Graph

댓글을 달려면 로그인하십시오.

답변 (1개)

Bruno Teramoto
Bruno Teramoto 2019년 9월 26일

1 개 추천

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
James Tursa 2019년 9월 26일
Please don't post complete answers to homework questions.

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 Image Processing Toolbox에 대해 자세히 알아보기

질문:

2019년 9월 26일

댓글:

2021년 6월 5일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by