小区用户分布源码程序 - matlab数学建模 - 谷速源码
下载频道> 资源分类> matlab源码> 数学建模> 小区用户分布源码程序

标题:小区用户分布源码程序
分享到:

所属分类: 数学建模 资源类型: 文件大小: 2.23 KB 上传时间: 2016-01-26 23:17:36 下载次数: 11 资源积分:1分 提 供 者: 马云 小区用户分布源码程序
内容:
小区用户分布源码程序,程序员在编程的过程中可以参考学习使用,希望对IT程序员有用,此源码程序简单易懂、方便阅读,有很好的学习价值!
function [bs] = cell_layout(cell_radius)
%Input the cell-radius in meters
%Output: Plots the cell layout with cell-centres
%Output
 
radius = cell_radius;  %radius in meters.
 
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)
 
%%
 
%Right Upper cell
x4= (radius+(radius/2)) + radius*cos(t);                        
y4 = ((sqrt(3)/2)*radius) + (radius*sin(t));
c_x4 = (radius+(radius/2)); %BS Location Right Upper cell x-axis
c_y4 = ((sqrt(3)/2)*radius); %BS Location Right Upper cell y-axis
plot(x4,y4);
 
%%
 
%Right Lower cell
x5= (radius+(radius/2)) + radius*cos(t);                        
y5 = -((sqrt(3)/2)*radius) + (radius*sin(t));
c_x5 = (radius+(radius/2)); %BS Location Right Lower cell x-axis
c_y5 = -((sqrt(3)/2)*radius); %BS Location Right Lower cell y-axis
plot(x5,y5);
 
%%
 
%Left Upper cell
x6= -(radius+(radius/2)) + radius*cos(t);                        
y6 = ((sqrt(3)/2)*radius) + (radius*sin(t));
c_x6 = -(radius+(radius/2)); %BS Location Right Lower cell x-axis
c_y6 = ((sqrt(3)/2)*radius); %BS Location Right Lower cell y-axis
plot(x6,y6);
 
%%
 
%Left Lower cell
x7= -(radius+(radius/2)) + radius*cos(t);                        
y7 = -((sqrt(3)/2)*radius) + (radius*sin(t));
c_x7 = -(radius+(radius/2)); %BS Location Left Lower cell x-axis
c_y7 = -((sqrt(3)/2)*radius); %BS Location Left Lower cell y-axis
plot(x7,y7);
BS_locations_x = [c_x1 c_x4 c_x2 c_x6 c_x7 c_x3 c_x5];
BS_locations_y = [c_y1 c_y4 c_y2 c_y6 c_y7 c_y3 c_y5];
 
cells_x = [x1; x4; x2; x6; x7; x3; x5];
cells_y = [y1; y4; y2; y6; y7; y3; y5];
%plot(cells_x(:),cells_y(:));  hold on
plot(BS_locations_x,BS_locations_y,'r+')
 
bs = [BS_locations_x' BS_locations_y' ];
 

文件列表(点击上边下载按钮,如果是垃圾文件请在下面评价差评或者投诉):

关键词: 源码 小区 程序

相关推荐

Top_arrow
回到顶部
联系方式| 版权声明| 招聘信息| 广告服务| 银行汇款| 法律顾问| 兼职技术| 付款方式| 关于我们|
网站客服网站客服 程序员兼职招聘 程序员兼职招聘
沪ICP备19040327号-3
公安备案号:沪公网安备 31011802003874号
库纳格流体控制系统(上海)有限公司 版权所有
Copyright © 1999-2014, GUSUCODE.COM, All Rights Reserved