%this function returns a map of difference between the angle to the point %of observation and the base station azimuth angle function [map] = directional_loss_map(Station) a_1 = 0.246335667; a_2 = 20.6; for r = 1:size(Station.terrain,1) for c = 1:size(Station.terrain,2) if((c == Station.cellSite.BSx) && (r == Station.cellSite.BSy)) map(r,c) = 0; else temp = double(find_angle(c-Station.cellSite.BSx,r-Station.cellSite.BSy)); map(r,c) = directional_loss(temp-double(Station.cellSite.azimuth)); end end end