function [coef] = hw7afn(m,x,y)

   for i = 1:m
      A(i,1) = x(i);
      A(i,2) = y(i);
   end

   for j = 3:m+1
      for i = 1:m-(j-2)
         A(i,j) = (A(i+1,j-1)-A(i,j-1))/(A(i+j-2,1)-A(i,1));
      end
   end
   coef = A(1,m+1);

end
