function y0 = dataeval(x0, w)
% assumes domain w(1,:) range w(2,:)
x = w(1,:); y = w(2,:); xx = x - x0;
eval0 = y(find(x==0));
oscilate = xx(1:end-1) .* xx(2:end);
i = find(oscilate < 0);
eval2 = (xx(i+1).*y(i)-xx(i).*y(i+1))./(xx(i+1)-xx(i));
y0 = union[eval0 eval2];
