script_ch.m

来自「Matlab file for famous HATA model」· M 代码 · 共 42 行

M
42
字号
%   author: Michal Bok, PWr 2008
clear all;

%      hBSef - effective base station antenna height [m]
%           30 <= hBS,ef <= 200 m
ht = 50; %[m]

%      hMS - mobile station antenna height [m]
%           1 <= hMS <= 10 m
hr = 2; %[m]

%      f - frequency [MHz]
%           1500 <= f <= 2000 MHz
f = 2000; %[MHz]

%      d - distance between antennas [km]
%           1 <= d <= 20 km
from = 1; %[km]
to = 20; %[km]
precision = 0.01; %[km]
d = from:precision:to; %[km]

%      area - area type: {1, 2}
%           1 - medium-sized city
%           2 - metropolitan centres
area = [1,2]; %{1, 2}

%   hL50dB = cost231hata(hBSef, hMS, f, d, area)
L = cost231hata(ht, hr, f, d, area);

clf reset;
plot(d, L,'-');
desc = ['ht = ',num2str(ht),' [m]   hr = ',num2str(hr),' [m]   f = ',...
    num2str(f),' [MHz]   d = ',num2str(from),'-',num2str(to),' [km]   teren = ', num2str(area)];
annotation('textbox',[0.15 0.7 0.2 0.2],'String',{desc},'FitBoxToText','on');
grid on;
axis auto;
title({'d - distance between antennas [km] / L - radio signal attenuation [dB]';...
    'attenuation value based on COST231-Hata Model'});
xlabel('d [km]');
ylabel('L [dB]');
legend('medium-sized city','metropolitan centres','location','Best');

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?