How to plot a cone in 3D.

205 visualizaciones (últimos 30 días)
obaid-ur-rehman
obaid-ur-rehman el 19 de Abr. de 2019
Respondida: Mayur el 4 de Mzo. de 2024
I want to plot a cone satisfying the equation |z| < x^(0.5)*y^(0.5) and it should look like as shown in the image. How to do this in matlab?cone.JPG

Respuesta aceptada

Nitin Phadkule
Nitin Phadkule el 17 de Ag. de 2021
Editada: darova el 19 de Ag. de 2021
[X,Y,Z]=cylinder([0 .5],50 );
axis([0 1,-1 1,-.5 .5])
M=makehgtform('translate',[0,0,0],'xrotate',pi/4,'yrotate',pi/2);
h=surf(X,Y,Z,'Parent',hgtransform('Matrix',M),'LineStyle','none','FaceAlpha',0.4);
view([30,35])
grid on
light

Más respuestas (1)

Mayur
Mayur el 4 de Mzo. de 2024
Create a MATLAB program that returns 3 D plot of a cone centered at the origin with unit length using 25 equally spaced points on the x and y directions Cylinder function can be y axis centered and be used directly cylinder(y, 25)

Categorías

Más información sobre Surface and Mesh Plots en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by