No BSD License  

Highlights from
Hata and COST231-Hata Models

image thumbnail
from Hata and COST231-Hata Models by Michal Bok
Hata and COST231-Hata Models

script_ch.m
%   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.001; %[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] every ',...
    num2str(precision*1000),' [m]'];
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');
s_21 = mean((L(2,:) - L(1,:)));
disp('MEAN(metropolitan_centres(d) - medium-sized city(d)) [dB] = ');
disp(s_21);

%fid = fopen('results.txt','wt');
%fprintf(fid,'%6.4f %8.4f %8.4f\n',[d;L]);
%xlswrite('results.xls',[d;L]');
%csvwrite('results.csv',[d;L]');
%wk1write('results.wk1',[d;L]');
%save results.mat;
%hgsave('curves.fig')
%fclose(fid);

Contact us at files@mathworks.com