Plot the volume for a horizontal cylinder

3 件のコメント

Star Strider
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
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 ExchangeImage 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