% MIDPOINT -- plot midpoints of Delfi

E = .05:.05:1.2;

global low1 high1 low2 high2

if (size(low1) ~= size(E)) | (size(high1) ~= size(E)),
  f = inline('delfi(x,y)', 'x', 'y');
  low1  = limits(f, E, [-5 0]);
  high1 = limits(f, E, [ 0 5]);
end

figure(1);
plot([0 low1], [0 E]);
hold on;
plot([0 high1], [0 E]);
plot([0 (low1+high1)./2], [0 E], '+');
hold off;
drawnow;

if (size(low2) ~= size(E)) | (size(high2) ~= size(E)),
  f = inline('delfi(x,y)', 'y', 'x');
  low2  = limits(f, E, [-5 0]);
  high2 = limits(f, E, [ 0 5]);
end

figure(2);
plot([0 low2], [0 E]);
hold on;
plot([0 high2], [0 E]);
plot([0 (low2+high2)./2], [0 E], '+');
hold off;
