Solid Of Revolution

조회 수: 15 (최근 30일)
Igor
Igor 2011년 3월 22일
Hello! I have a problem that is hard to solve, I need to generate the image of a solid of revolution from the function y = ((x ^ 4) / 8) + (1 / (4 * (x ^ 2)));
I searched several websites, books and tutorials but found nothing to help me how to rotate this function. I've tried using the command cylinder, but neither worked.
What I got so far was this:
clear
close all
clc
x=sym('x');
y=((x^4)/8)+(1/(4*(x^2)));
[X,Y,Z]=cylinder(y);
ezsurf(X,Y,Z); title('Solid of Revolution'); xlabel('X'), ylabel('Z'), zlabel('Y');
Could anyone help me?
Thanks!

채택된 답변

Walter Roberson
Walter Roberson 2011년 3월 22일
You aren't going to be able to plot an infinitely wide surface, which is what you are implicitly asking to do by allowing 0 to be included in the range for x (the default domain is -120 to +120 for x and y). The surface tends toward infinity as x tends towards 0 and as x tends towards infinity. Unless you cut a fairly narrow band, you are going to have a mess. And if you do cut a specific band, you can use specific x values to generate the solid rather than trying to get cylinder() to work with symbolics.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Mathematics에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by