function mapb = map_blur(map)
% Michael Otte
% University of Colorado at Boulder
%
% blurs a map

[X Y] = size(map);

mapb = zeros(X,Y);
for i = 2:1:X-1
    for j = 2:1:Y-1
        mapb(i,j) = (map(i,j) + map(i+1,j) + map(i-1,j) + map(i,j+1) + map(i,j-1))/5;
    end
end

mapb(1,:) = mapb(2,:);
mapb(X,:) = mapb(X-1,:);

mapb(:,1) = mapb(:,2);
mapb(:,Y) = mapb(:,Y-1);
