clear all;
close all;
clc;
disp('The Free Space Propagation Model.');
Gt = input('Enter transmitter antenna gain:- ');
Gr = input('Enter receiver antenna gain:- ');
f = input('Enter the operating frequency:- ');
l = 300 / f;
d = 50:50:2000;
Pl1 = (Gt * Gr * l^2) / ((4 * pi)^2);
for i = 1:40
Pl(i) = -10 * log10(Pl1/d(i)^2);
end
plot(d,Pl,'-*r');
title('The Free Space Propagation Model');
xlabel('T-R seperation(in meters)----->');
ylabel('Path Loss(dB)------>');