plotting Solid of revolution of a function

조회 수: 15 (최근 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 CenterFile Exchange에서 Surface and Mesh Plots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by