function T = cooling ( T )

%% cooling takes one cooling step on an array of temperatures.

  Told = T;
  [ m, n ] = size ( T );

  T(2:m-1,2:n-1) = 0.25 * ( Told(1:m-2,2:n-1) ...  % (west)
                          + Told(3:m,2:n-1) ...    % (east)
                          + Told(2:m-1,1:n-2) ...  % (north)
                          + Told(2:m-1,3:n) );     % (south)
  return
end
