function [ d ] = DD2new ( x, y )
% DD2new Compute the divided difference for 2 points.
%   Input: x = vector of 2 data points, y = values at these points.

if length (x) ~= length (y)
    error ('Vector lengths do not agree.');
end

d = (y (2)-y (1))/(x (2)-x (1));

end
