# MATLAB: Why when i plot the graph for the okumura model it doesnt show line

graphMATLABplot

%Matlab cache clearing commandsclc;                                                                        %clears command windowclear all;                                                                  %clears workspace variablesclose all;                                                                  %closes all external matlab windows%input starts hereHte=100;                                                                    %Base Station Height between 30 m and 1000 m Hre=10;                                                                     %Mobile Station Antenna Height between 1 m and 10 m d =1;                                                                       %distance from base station between 1Km and 100Km f=900;                                                                      %Frequency between 150Mhz and 1920Mhz Amu = 18;                 %Median attenuationKcor =9;                 %Correction factor %SUBURBAN AREAfor i=1:length(f)    Lfsl = 10*log((((3*10^8)/f(i))^2)/((4*pi)^2)*d^2);                                               % finding free space loss    Ghte = 20*log(Hte/200);                                                                          % Base station antenna height gain factor    if(Hre>3)        Ghre = 20*log(Hre/3);                                                                        % Mobile station antenna height gain factor    else        Ghre = 10*log(Hre/3);    end    L(i) = Lfsl+Amu(i)-Ghte-Ghre-Kcor(i);                                                          % formula for path lossend disp(L)                                                                     %prints the Loss Array% plot of Distance vs Loss (dB) for surburban  figure(1)                                                                   %Enables the figureplot(f,L);                                                                  %versus plotting commandtitle('Distance vs Loss (dB) for open area for Okumura Model');            %title of the plotxlabel('Distance(Km)');                                                    %label for X-axisylabel('Propagation Path loss(dB)');                                        %label for Y-axisgrid on;                                                                    %Enables Grid feature in plot%inputs%    50%    5%    10%    [200 300 400 500 600 700 800 900 1000 1100]%    [20.4 20.45 20.5 20.55 20.6 20.65 20.7 20.75 20.8 20.85]%    [23 24 25 25.5 26 27 27.5 28 28.75 29]

%Matlab cache clearing commandsclc;                                                                        %clears command windowclear all;                                                                  %clears workspace variablesclose all;                                                                  %closes all external matlab windows%input starts hereHte=100;                                                                    %Base Station Height between 30 m and 1000 mHre=10;                                                                     %Mobile Station Antenna Height between 1 m and 10 md =1;                                                                       %distance from base station between 1Km and 100Kmf=200:900; % MADE AN ARRAY FROM f                                                                     %Frequency between 150Mhz and 1920MhzAmu = 18;                 %Median attenuationKcor =9;                 %Correction factor%SUBURBAN AREALfsl = 10*log((((3*10^8)./f)).^2)/((4*pi)^2)*d^2;                                               % finding free space lossGhte = 20*log(Hte/200);                                                                          % Base station antenna height gain factorif(Hre>3)    Ghre = 20*log(Hre/3);                                                                        % Mobile station antenna height gain factorelse    Ghre = 10*log(Hre/3);endL = Lfsl+Amu-Ghte-Ghre-Kcor;                                                          % formula for path lossdisp(L)                                                                     %prints the Loss Array% plot of Distance vs Loss (dB) for surburbanfigure(1)                                                                   %Enables the figureplot(f,L);                                                                  %versus plotting commandtitle('Distance vs Loss (dB) for open area for Okumura Model');            %title of the plotxlabel('Distance(Km)');                                                    %label for X-axisylabel('Propagation Path loss(dB)');                                        %label for Y-axisgrid on;                                                                    %Enables Grid feature in plot%inputs%    50%    5%    10%    [200 300 400 500 600 700 800 900 1000 1100]%    [20.4 20.45 20.5 20.55 20.6 20.65 20.7 20.75 20.8 20.85]%    [23 24 25 25.5 26 27 27.5 28 28.75 29]