How to plot a cone in 3D.

조회 수: 228 (최근 30일)
obaid-ur-rehman
obaid-ur-rehman 2019년 4월 19일
답변: Mayur 2024년 3월 4일
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

채택된 답변

Nitin Phadkule
Nitin Phadkule 2021년 8월 17일
편집: darova 2021년 8월 19일
[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

추가 답변 (1개)

Mayur
Mayur 2024년 3월 4일
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)

카테고리

Help CenterFile Exchange에서 Surface and Mesh Plots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by