% hw050.m

xvec = linspace ( -1.5, 1.5, 51 );
yvec = linspace ( -1.0, 2.0, 51 );
[ X, Y ] = meshgrid ( xvec, yvec );
Z = f ( X, Y );
cvec = linspace ( 0, 300, 25 );
contour ( X, Y, Z, cvec, 'LineWidth', 3 );
xlabel ( '<-- X -->' );
ylabel ( '<-- Y -->' );
title ( 'HW050', 'Fontsize', 24 );
print ( '-djpeg', 'hw050.jpg' );

function Z = f ( X, Y )
  Z = ( 1.0 - X ) .^ 2 + 100.0 * ( Y - X .^ 2 ) .^ 2;
  return
end
  