sketch cone in matlab

5 次查看(过去 30 天)
john
john 2022-8-31
回答: KSSV 2022-8-31
Sketch in MATLAB the 3D surface of the cone (z −1)^2 = x^2 + y^2

回答(1 个)

KSSV
KSSV 2022-8-31
t = linspace(0,2*pi,50) ;
r = linspace(0,3,50) ;
[th r] = meshgrid(t,r) ;
x = r.*cos(th) ;
y = r.*sin(th) ;
z = r ;
surf(x,y,z) ;

类别

Help CenterFile Exchange 中查找有关 Surface and Mesh Plots 的更多信息

产品


版本

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by