Solid Of Revolution
14 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
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!
0 Commenti
Risposta accettata
Walter Roberson
il 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.
0 Commenti
Più risposte (0)
Vedere anche
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!