function es=polyf(b,x,y)
% function es=polyf(b,x,y)  finds sum of errors, absolute errors in linear fit
% Finds the sum of errors and the sum of the absolute errors
%    in a linear fit of x,y data.
es=[0 0];
for j=1:3
   ej=y(j)-b(1)-b(2)*x(j);
   es(1)=es(1)+ej;
   es(2)=es(2)+abs(ej);
end
