% FIGURE 4.8.1
      function DOT = DOT(X,Y,N)
%                              CALCULATE DOT PRODUCT OF X AND Y
      DOT = 0.0;
      for I=2:N
      for J=2:N
         DOT = DOT + X(I,J)*Y(I,J);
      end
      end
