Appendix

 

23 .m files were created to implement the model.  Here, just the function that creates the predicted RM maps is provided.

 

function mat = PL2(map,binmat);

 

%   Creates predicted RM map

%   mat: RM matrix

%   map: Cell_Info_X

%   binmat: matrix of X's building locations

 

mat = zeros(203,203);

amat = AnglMat(map);

dbval = -9;

m = 1;

while(m <= 203)

    n = 1;

    while(n <= 203)

       d = sqrt((1015 - 10*n - 5)^2 + (1025 - 10*m - 5)^2);

       if(d == 0)

           n = n + 1;

          

       elseif(binmat(m,n) == 0 & Awithin(map.azimuth,amat(m,n),60,0) & d < 50)

           mat(m,n) = -35;

           n = n + 1;

          

       elseif(binmat(m,n) == 1 & Awithin(map.azimuth,amat(m,n),60,0) & d < 50)

           mat(m,n) = -20;

           n = n + 1;

       

       elseif(binmat(m,n) == 0 & Awithin(map.azimuth,amat(m,n),60,0) & 50 < d & d < 200)

           mat(m,n) = -33.7356*log10(d);

           n = n + 1;

       

       elseif(binmat(m,n) == 1 & Awithin(map.azimuth,amat(m,n),60,0) & 50 < d & d < 200)

           mat(m,n) = -26.5478*log10(d);

           n = n + 1;

          

       elseif((binmat(m,n) == 0 & Awithin(map.azimuth,amat(m,n),60,0) & 200 < d & d < 400))

           mat(m,n) = -32.7791*log10(d);

           n = n + 1;

           

       elseif((binmat(m,n) == 1 & Awithin(map.azimuth,amat(m,n),60,0) & 200 < d & d < 400))

           mat(m,n) = -29.4389*log10(d);

           n = n + 1;

          

       elseif((binmat(m,n) == 0 & Awithin(map.azimuth,amat(m,n),60,0) & 400 < d & d < 600))

           mat(m,n) = dbval - 29.1968*log10(d);

           n = n + 1;

          

       elseif((binmat(m,n) == 1 & Awithin(map.azimuth,amat(m,n),60,0) & 400 < d & d < 600))

           mat(m,n) = -29.1968*log10(d);

           n = n + 1;

           

       elseif((binmat(m,n) == 0 & Awithin(map.azimuth,amat(m,n),60,0) & 600 < d & d < 800))

           mat(m,n) = dbval - 26.9043*log10(d);

           n = n + 1;

          

       elseif((binmat(m,n) == 1 & Awithin(map.azimuth,amat(m,n),60,0) & 600 < d & d < 800))

           mat(m,n) = -26.9043*log10(d);

           n = n + 1;

          

       elseif(Awithin(map.azimuth,amat(m,n),60,0) & d > 800)

           mat(m,n) = -80;

           n = n + 1;

          

       elseif(binmat(m,n) == 0 & (Awithin(map.azimuth,amat(m,n),60,60) | Awithin(map.azimuth,amat(m,n),60,-60)) & d < 50)

           mat(m,n) = -70;

           n = n + 1;

          

       elseif(binmat(m,n) == 1 & (Awithin(map.azimuth,amat(m,n),60,60) | Awithin(map.azimuth,amat(m,n),60,-60)) & d < 50)

           mat(m,n) = -50;

           n = n + 1;

          

       elseif(binmat(m,n) == 0 & (Awithin(map.azimuth,amat(m,n),60,60) | Awithin(map.azimuth,amat(m,n),60,-60)) & 50 < d & d < 200)

           mat(m,n) = -37.7260*log10(d);

           n = n + 1;

          

       elseif(binmat(m,n) == 1 & (Awithin(map.azimuth,amat(m,n),60,60) | Awithin(map.azimuth,amat(m,n),60,-60)) & 50 < d & d < 200)

           mat(m,n) = -31.0906*log10(d);

           n = n + 1;

          

       elseif(binmat(m,n) == 0 & (Awithin(map.azimuth,amat(m,n),60,60) | Awithin(map.azimuth,amat(m,n),60,-60)) & 200 < d & d < 400)

           mat(m,n) = -35.2627*log10(d);

           n = n + 1;

          

       elseif(binmat(m,n) == 1 & (Awithin(map.azimuth,amat(m,n),60,60) | Awithin(map.azimuth,amat(m,n),60,-60)) & 200 < d & d < 400)

           mat(m,n) = -30.6442*log10(d);

           n = n + 1;

          

       elseif(binmat(m,n) == 0 & (Awithin(map.azimuth,amat(m,n),60,60) | Awithin(map.azimuth,amat(m,n),60,-60)) & 400 < d & d < 600)

           mat(m,n) = -33.2056*log10(d);

           n = n + 1;

          

       elseif(binmat(m,n) == 1 & (Awithin(map.azimuth,amat(m,n),60,60) | Awithin(map.azimuth,amat(m,n),60,-60)) & 400 < d & d < 600)

           mat(m,n) = -30.6137*log10(d);

           n = n + 1;

          

       elseif(binmat(m,n) == 0 & (Awithin(map.azimuth,amat(m,n),60,60) | Awithin(map.azimuth,amat(m,n),60,-60)) & 600 < d & d < 800)

           mat(m,n) = dmval - 29.5374*log10(d);

           n = n + 1;

           

       elseif(binmat(m,n) == 1 & (Awithin(map.azimuth,amat(m,n),60,60) | Awithin(map.azimuth,amat(m,n),60,-60)) & 600 < d & d < 800)

           mat(m,n) = -29.5374*log10(d);

           n = n + 1;

          

       elseif((Awithin(map.azimuth,amat(m,n),60,60) | Awithin(map.azimuth,amat(m,n),60,-60)) & 800 < d)

           mat(m,n) = -86;

           n = n + 1;

       

       elseif(binmat(m,n) == 0 & (Awithin(map.azimuth,amat(m,n),60,120) | Awithin(map.azimuth,amat(m,n),60,-120)) & d < 50)

           mat(m,n) = -77;

           n = n + 1;

          

       elseif(binmat(m,n) == 1 & (Awithin(map.azimuth,amat(m,n),60,120) | Awithin(map.azimuth,amat(m,n),60,-120)) & d < 50)

           mat(m,n) = -74;

           n = n + 1;

          

       elseif(binmat(m,n) == 0 & (Awithin(map.azimuth,amat(m,n),60,120) | Awithin(map.azimuth,amat(m,n),60,-120)) & 50 < d & d < 200)

           mat(m,n) = -40.7646*log10(d);

           n = n + 1;

          

       elseif(binmat(m,n) == 1 & (Awithin(map.azimuth,amat(m,n),60,120) | Awithin(map.azimuth,amat(m,n),60,-120)) & 50 < d & d < 200)

           mat(m,n) = -35.9903*log10(d);

           n = n + 1;

          

       elseif(binmat(m,n) == 0 & (Awithin(map.azimuth,amat(m,n),60,120) | Awithin(map.azimuth,amat(m,n),60,-120)) & 200 < d & d < 400)

           mat(m,n) = -37.8055*log10(d);

           n = n + 1;

          

       elseif(binmat(m,n) == 1 & (Awithin(map.azimuth,amat(m,n),60,120) | Awithin(map.azimuth,amat(m,n),60,-120)) & 200 < d & d < 400)

           mat(m,n) = -34.3886*log10(d);

           n = n + 1;

          

       elseif(binmat(m,n) == 0 & (Awithin(map.azimuth,amat(m,n),60,120) | Awithin(map.azimuth,amat(m,n),60,-120)) & 400 < d & d < 600)

           mat(m,n) = -34.0102*log10(d);

           n = n + 1;

           

       elseif(binmat(m,n) == 1 & (Awithin(map.azimuth,amat(m,n),60,120) | Awithin(map.azimuth,amat(m,n),60,-120)) & 400 < d & d < 600)

           mat(m,n) = -31.7998*log10(d);

           n = n + 1;

          

       elseif(binmat(m,n) == 0 & (Awithin(map.azimuth,amat(m,n),60,120) | Awithin(map.azimuth,amat(m,n),60,-120)) & 600 < d & d < 800)

           mat(m,n) = -31.1940*log10(d);

           n = n + 1;

          

       elseif(binmat(m,n) == 1 & (Awithin(map.azimuth,amat(m,n),60,120) | Awithin(map.azimuth,amat(m,n),60,-120)) & 600 < d & d < 800)

           mat(m,n) = -28.4447*log10(d);

           n = n + 1;

          

       elseif((Awithin(map.azimuth,amat(m,n),60,120) | Awithin(map.azimuth,amat(m,n),60,-120)) & 800 < d)

           mat(m,n) = -87;

           n = n + 1;

          

       elseif(binmat(m,n) == 0 & Awithin(Areflect(map.azimuth),amat(m,n),60,0) & d < 50)

           mat(m,n) = -82;

           n = n + 1;

          

       elseif(binmat(m,n) == 1 & Awithin(Areflect(map.azimuth),amat(m,n),60,0) & d < 50)

           mat(m,n) = -77;

           n = n + 1;

          

       elseif(binmat(m,n) == 0 & Awithin(Areflect(map.azimuth),amat(m,n),60,0) & 50 < d & d < 200)

           mat(m,n) = -42.6595*log10(d);

           n = n + 1;

           

       elseif(binmat(m,n) == 1 & Awithin(Areflect(map.azimuth),amat(m,n),60,0) & 50 < d & d < 200)

           mat(m,n) = -38.0413*log10(d);

           n = n + 1;

          

       elseif(binmat(m,n) == 0 & Awithin(Areflect(map.azimuth),amat(m,n),60,0) & 200 < d & d < 400)

           mat(m,n) = -38.4984*log10(d);

           n = n + 1;

          

       elseif(binmat(m,n) == 1 & Awithin(Areflect(map.azimuth),amat(m,n),60,0) & 200 < d & d < 400)

           mat(m,n) = -32.0617*log10(d);

           n = n + 1;

          

       elseif(binmat(m,n) == 0 & Awithin(Areflect(map.azimuth),amat(m,n),60,0) & 400 < d & d < 600)

           mat(m,n) = -33.4085*log10(d);

           n = n + 1;

          

       elseif(binmat(m,n) == 1 & Awithin(Areflect(map.azimuth),amat(m,n),60,0) & 400 < d & d < 600)

           mat(m,n) = -31.2063*log10(d);

           n = n + 1;

          

       elseif(binmat(m,n) == 0 & Awithin(Areflect(map.azimuth),amat(m,n),60,0) & 600 < d & d < 800)

           mat(m,n) = -27.8087*log10(d);

           n = n + 1;

          

        elseif(binmat(m,n) == 1 & Awithin(Areflect(map.azimuth),amat(m,n),60,0) & 600 < d & d < 800)

           mat(m,n) = -27.8087*log10(d);

           n = n + 1;

         

        elseif(binmat(m,n) == 0 & Awithin(Areflect(map.azimuth),amat(m,n),60,0) & 800 < d)

           mat(m,n) = dbval - 79;

           n = n + 1;

          

        elseif(binmat(m,n) == 1 & Awithin(Areflect(map.azimuth),amat(m,n),60,0) & 800 < d)

           mat(m,n) = -79;

           n = n + 1;

          

        else

            mat(m,n) = -31.5*log10(d);

            n = n + 1;

        end

    end

    m = m + 1;

end

 

Home