% hw036.m
% John Burkardt
% Draw an 8x8 checkerboard, red square in lower right.
%
clf
hold on

for i = 1 : 8
  ylist = [ i - 1, i - 1, i, i ];
  for j = 1 : 8
    xlist = [ j - 1, j, j, j - 1 ];
    if ( mod ( i + j, 2 ) == 0 )
      color = 'r';
    else
      color = 'k';
    end
    fill ( xlist, ylist, color );
  end
end
hold off

axis equal
axis off
print ( '-djpeg', 'hw036.jpg' );
