xcc0900720130 发表于 2012-2-7 20:11

移动搜索 正六边形(中继站) 蜂窝中心坐标 Matlab


我想用移动搜索的办法确定一个确定的圆(规定区域)所能覆盖的最少正六边形(也就是中继站),可是确定下面的蜂窝中心确实遇到些麻烦,我想把它们的坐标放到一个矩阵里。希望大家帮个忙,谢谢了。
下面是画蜂巢的Matlab 程序
r=1;
rc=0.7;
figure;
axis square
hold on;
A=pi/3*;
aa=linspace(0,pi*2,80);
plot(r*exp(i*A),'k','linewidth',2);
g1=fill(real(r*exp(i*A)),imag(r*exp(i*A)),'k');
set(g1,'FaceColor',)
g2=fill(real(rc*exp(i*aa)),imag(rc*exp(i*aa)),'k');
set(g2,'FaceColor',,'edgecolor',,'EraseMode','xor')
text(0,0,'1','fontsize',10);
Z=0;
At=pi/6;
RA=-pi/2;
N=1;At=-pi/2-pi/3*;
for k=1:3;
Z=Z+sqrt(3)*r*exp(i*pi/6);
for pp=1:6;
for p=1:k;
N=N+1;
zp=Z+r*exp(i*A);
zr=Z+rc*exp(i*aa);
g1=fill(real(zp),imag(zp),'k');
set(g1,'FaceColor',,'edgecolor',);
g2=fill(real(zr),imag(zr),'k');
set(g2,'FaceColor',,'edgecolor',,'EraseMode','xor');
text(real(Z),imag(Z),num2str(N),'fontsize',10);
Z=Z+sqrt(3)*r*exp(i*At(pp));
end
end
end
xlim([-6,6]*r)
ylim([-6,6]*r)

ttttnt 发表于 2012-2-7 20:14

要好好看看啦!

独荷 发表于 2012-2-7 22:41

回复赚体力啊

第五桌 发表于 2012-2-7 23:47

我研究研究...

xcc0900720130 发表于 2012-2-8 00:06

第五桌 发表于 2012-2-7 23:47 static/image/common/back.gif
我研究研究...

嗯,麻烦了。

xuconghit 发表于 2012-2-8 08:05

{:3_41:}{:3_41:}{:3_41:}{:3_41:}{:3_41:}

alair006 发表于 2012-2-8 08:30

pantsoncrap 发表于 2012-2-8 08:39

{:3_61:}{:3_61:}{:3_61:}

zhangchenyang.z 发表于 2012-2-8 09:16

刚刚的!!!!!!!

zhxmdy1987 发表于 2012-2-8 09:53

好好学习天天向上
页: [1] 2 3
查看完整版本: 移动搜索 正六边形(中继站) 蜂窝中心坐标 Matlab