function yprime = datadiff(w)
% assumes domain w(1,:) range w(2,:)
x = w(1,:); y = w(2,:);
midpts = (x(1:end-1)+x(2:end))/2;
slopes = diff(y) ./ diff(x);
yprime = [midpts ; slopes];
