Solid Of Revolution

6 views (last 30 days)
Igor
Igor on 22 Mar 2011
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!

Accepted Answer

Walter Roberson
Walter Roberson on 22 Mar 2011
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.

More Answers (0)

Categories

Find more on 2-D and 3-D Plots in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!