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!