Professional Documents
Culture Documents
Hexagon Matlab Code
Hexagon Matlab Code
t = linspace(0,2*pi,7);
%center cell
t = linspace(0,2*pi,7);
%center cell
x1 = 0 + radius*cos(t);
y1 = 0 + radius*sin(t);
c_x1 = 0; %BS Location Center Cell x-axis
c_y1 = 0; %BS Location Center Cell y-axis
plot(x1,y1);
hold on
%%
% Upper cell
x2=0+radius*cos(t);
y2 = ((sqrt(3)/2)*2*radius) + (radius*sin(t));
c_x2 = 0; %BS Location Upper cell Cell x-axis
c_y2 = ((sqrt(3)/2)*2*radius); %BS Location Upper cell y-axis
plot(x2,y2);
%%
% Lower cell
x3=0+radius*cos(t);
y3 = -((sqrt(3)/2)*2*radius) + (radius*sin(t));
c_x3 = 0; %BS Location Lower cell Cell x-axis
c_y3 = -((sqrt(3)/2)*2*radius); %BS Location Lower cell y-axis
plot(x3,y3)
%%
%%
%%
%%
bs = [BS_locations_x' BS_locations_y' ];