function A = DivDiff( x,y,n )
%This function computes a divided difference table for n+1 input (x,y)
%values.
%   Dependent Variable nodes are input in y.  Interpolation values are
%   inputed in y.  These are used to compute divided differences that can
%   be used to form an interpolating polynomial of degree n.
for i=1:n+1
    A(i,1)=y(i);
end
for i=1:n
    for j=1:n-i+1
        A(j,i+1)=(A(j+1,i)-A(j,i))/(x(i+j)-x(j)); %#ok<*AGROW>
    end
end
    

end

