Matlab画出六边形程序

标签:
matlab六边形it |
分类: Matlab/NS2/OPNET |
clear all;
close all;
clc
n = 6;
alpha = linspace(0,2*pi,n+1);
r=10;
x=r*cos(alpha);
y=r*sin(alpha);
axis equal
axis([-3*r-5 3*r+5 -3*r-5 3*r+5]);
axis off
hold on
plot(x,y,'linewidth',2)
theta = linspace(pi/2,5*pi/2,n+1);
x0=sqrt(3)*r*cos(theta);
y0=sqrt(3)*r*sin(theta);
for i=1:n
end
hold off
程序的效果:
http://s15/bmiddle/4c82872349a2ef948f16e&690
后一篇:MsChart 的使用(转载)