%
% Figure 20.3a
%
x = (1:0.5:10) * 0.5;
y = (1:0.5:10) * 0.4 + 1;
%
z = zeros( length(x), length(y) );
for i = 1:length(x),
  for j = 1:length(y),
    dd = ((a*1.36*y(j)-a*b-a*a*x(i))/(a*a+1))^2 + ...
	       ((a*x(i)+b-1.36*y(j))/(a*a+1))^2;
    z(i,j) = dd + 0.25*( x(i) - 2.5 )^2;
  end;
end;
figure;
mesh( x, y, z' );
set( gca, 'fontsize', 16 );
xlabel( 'DO in mg/l' );
ylabel( 'RAS in Ml/d' );
zlabel( 'Objective J' );
print -f1 -deps2 fig20-03a.eps
%
% figure 20-3b
%
a = 9;
b = 10;
z = zeros( length(x), length(y) );
for i = 1:length(x),
  for j = 1:length(y),
    dd = ((a*11.36*y(j)-a*b-a*a*x(i))/(a*a+1))^2 + ...
	       ((a*x(i)+b-11.36*y(j))/(a*a+1))^2;
    z(i,j) = dd + 0.25*( x(i) - 2.5 )^2;
  end;
end;
figure;
mesh( x, y, z' );
set( gca, 'fontsize', 16 );
xlabel( 'DO in mg/l' );
ylabel( 'RAS in Ml/d' );
zlabel( 'Objective J' );
print -f2 -deps2 fig20-03b.eps
%
