1.2 x=[1:100000]; pl=30+10*2.5*log10(x/5)+normrnd(0,4); figure(2) semilogx(x,pl,'r') xlabel('Distance [m]') ylabel('Path loss [dB]') hold on; y=[1:100000]; p2=35+10*4.1*log10(y/10)+normrnd(0,8); semilogy(y,p2) legend('p1','p2')

1.3

1. Free space model x=[1:10000]; pl=10*log10((4*pi*x)./(10*3e8/2.4e9)).^2; plot(x,pl) title('Free Space Model') xlabel('Distance [m]') ylabel('Path loss[dB]') print -dpdf graph.pdf

2. Shadowing model x=[1:10000]; pl=30+10*2.2*log10(x/1)+normrnd(0,4); plot(x,pl,'r') title('Shadowing Effect Model') xlabel('Distance [m]') ylabel('Path loss [dB]') print -dpdf graph.pdf

3. Two ray model x=[1:10000]; pl=10*log10((x.^4)./(10*(4.^2)*(0.8.^2))); figure(8) plot(x,pl) title('Two Ray Model') xlabel('Distance [m]') ylabel('Path loss')

4. JTC model x=[1:10000]; pl=38+15+30*log(x)+lognrnd(0,4); figure(8) plot(x,pl) xlabel('Distance [m]') ylabel('Path loss')

5. Hata’s model x=[1:10000]; a_hms = 3.2*(log10(11.75*0.8)).^2-4.97; pl=46.3+33.9*log10(2.4e9)-13.82*log10(4)-a_hms+(44.9-6.55*log10(4))*log10(x) + 3; plot(x,pl) title('Hata Model') xlabel('Distance [m]') ylabel('Path loss[dB]') print -dpdf graph.pdf

Example 11

pl=[27 40 42 48 47 55 57 ;

28 41 41 46 48 50 60; 31 42 43 47 45 53 56]; x = [ 1 2 4 6 8 10 15]; plot(x,pl,'.'); title('Path…