plot a hexagonal figure

1 次查看(过去 30 天)
I need to plot a hexagonal figure like (a) part of this image.
How can i do that?
  5 个评论
Adam Danz
Adam Danz 2021-8-18
Please do not ask duplicate questions in the future.

请先登录,再进行评论。

采纳的回答

Adam Danz
Adam Danz 2021-8-3
th = linspace(0,2*pi,7) + pi/6;
x = sin(th);
y = cos(th);
figure()
tiledlayout(1,2)
nexttile()
plot(x,y,'k-o','markerSize',3,'MarkerFaceColor','k')
axis equal
axis padded
nexttile()
hold on
zDist = .3;
plot3(x(:)*[1,1],y(:)*[1,1],zDist.*[-.5,.5].*ones(numel(x),1),'k-')
plot3([1;1]*x(:)', [1;1]*y(:)',zDist.*[-.5,.5],'k-')
zlim([-1,1])
view(-50,15)

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Lighting, Transparency, and Shading 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by