clear;

f = 1:2:1000; % freq in GHz
Rr = 2.54; % rainfall rate in mm/hr
T = 20; %temp in degree C

nf = length(f);

extinc = zeros(nf,1);

for ii = 1: nf
    f(ii)
   extinc(ii) = RainExtincCoef(Rr,f(ii), T);
end

figure(1)
loglog(f, extinc)
% axis([ 1 1000 0.001 100])
grid

%---------------------------------------
% 
% f = 35; 
% Rr = 0.5:0.5:100;
% 
% nf = length(Rr);
% 
% extinc = zeros(nf,1);
% 
% for ii = 1: nf
%    extinc(ii) = RainExtincCoef(Rr(ii),f,T);
% end
% 
% figure(2)
% plot(Rr, extinc)
% grid
