Solid Of Revolution

14 ビュー (過去 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 Center および File ExchangeMathematics についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by