plotting Solid of revolution of a function

10 ビュー (過去 30 日間)
Fernando Moreno
Fernando Moreno 2022 年 3 月 2 日
コメント済み: Fernando Moreno 2022 年 3 月 2 日
Im trying to make a plot of a solid of revolution using a function but I don't knwo how to do it
In the plot the solid of revolution needs to be in base of the x axis in [0, pi]
syms x
y=sin(x)
hold on
fplot(y,[0,pi])
xline(0)
xline(pi)
yline(0)
hold off

回答 (1 件)

Alan Stevens
Alan Stevens 2022 年 3 月 2 日
How about:
X = 0:0.1:pi; R = sin(X); [z,x,y] = cylinder(R);
surf(x,y,z)
  1 件のコメント
Fernando Moreno
Fernando Moreno 2022 年 3 月 2 日
I think i can work with it, thank you very much

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeSurface and Mesh Plots についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by