How to plot a cone in 3D.
173 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
obaid-ur-rehman
le 19 Avr 2019
Réponse apportée : Mayur
le 4 Mar 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](https://www.mathworks.com/matlabcentral/answers/uploaded_files/214872/cone.jpeg)
0 commentaires
Réponse acceptée
Nitin Phadkule
le 17 Août 2021
Modifié(e) : darova
le 19 Août 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
0 commentaires
Plus de réponses (1)
Mayur
le 4 Mar 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)
0 commentaires
Voir également
Catégories
En savoir plus sur Surface and Mesh Plots dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!