📄 cost231wi.m
字号:
function loss = cost231w1(distance)
% distance : distance between MS and BS in km
% frequency : frequency in MHz
% hte : height of BS [4,50] meter
% hre : height of MS [1,3] meter
% ws : width of the road in meter
% wb : distance between two building in meter
% hb : height of the building in meter
% fi : orientation degree
% los : 1 - LOS
% 0 - NLOS
% zone : 1 - Urban area
% 0 - Sub-urban
hte= 30;
hre= 1.5;
ws=10;
wb=20;
hb=15;
los=0;
zona=1;
frequency=900;
[m,n] = size(distance);
loss = zeros(m,n);
for a = 1:m
for b = 1:n
fi=90;
if los == 1
loss(a,b) = -(42.6+26*log10(distance(a,b))+20*log10(frequency));
else
loss(a,b) = mscost231(distance(a,b), frequency, hte, hre, ws, wb, hb, zona);
parcial = rtscost231(frequency, hre, ws, hb, fi);
loss(a,b) =loss(a,b) + parcial - 32.4 - 40*log10(distance(a,b)) - 20*log(900);
end
end
end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -