⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cost231hata.m

📁 Matlab file for famous HATA model
💻 M
字号:
function [hL50dB] = cost231hata(hBSef, hMS, f, d, area)
%COST231Hata - function returns signal attenuation value based on
%              COST231-Hata Model
%
%   hL50dB = cost231hata(hBSef, hMS, f, d, area)
%
%      hL50dB - radio signal attenuation [dB]
%
%      hBSef - effective base station antenna height [m]
%           30 <= hBS,ef <= 200 m
%      hMS - mobile station antenna height [m]
%           1 <= hMS <= 10 m
%      f - frequency [MHz]
%           1500 <= f <= 2000 MHz
%      d - distance between antennas  [km]
%           1 <= d <= 20 km
%      area - area type: {1, 2}
%           1 - medium-sized city   2 - metropolitan centres
%   author: Michal Bok, PWr 2008

n = 0;

for i = (area)
n = n + 1;
if((min(f)>=1500)&&(max(f)<=2000))
    if((min(hBSef)>=30)&&(max(hBSef)<=200))
        if((min(hMS)>=1)&&(max(hMS)<=10))
            if((i==1)||(i==2))
                if((min(d)>=1)&&(max(d)<=20))
        ahMS = (1.1 * log10(f) - 0.7) * hMS - (1.56 * log10(f) - 0.8);
        if(i==1)
            C = 0;
        end
        if(i==2)
            C = 3;
        end
        
        L50dB = 46.3 + 33.9 * log10(f) - 13.82 * log10(hBSef) - ahMS + (44.9 - 6.55 * log10(hBSef)) * log(d) + C;
        hL50dB(n,:) = L50dB;
        
                else
                    disp('ERROR: required distance between antennas = 1 <= d <= 20 km');
                end
            else
                disp('ERROR: required area type = 1 lub 2');
            end
        else
            disp('ERROR: required mobile station antenna height = 1 <= hMS <= 10 m');
        end
    else
        disp('ERROR: required effective base station antenna height = 30 <= hBS,ef <= 200 m');
    end
else
    disp('ERROR: required frequency = 1500 <= f <= 2000 MHz');
end
end
end

⌨️ 快捷键说明

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